Skip to content

Commit 035d112

Browse files
committed
flip "Go to favorite" and "Sort"
1 parent 1dcfb9e commit 035d112

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232
}
3333

3434
dependencies {
35-
compile 'com.simplemobiletools:commons:2.22.4'
35+
compile 'com.simplemobiletools:commons:2.22.7'
3636
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
3737
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3838
}

app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
123123
override fun onOptionsItemSelected(item: MenuItem): Boolean {
124124
when (item.itemId) {
125125
R.id.go_home -> goHome()
126+
R.id.go_to_favorite -> goToFavorite()
126127
R.id.sort -> showSortingDialog()
127128
R.id.add_favorite -> addFavorite()
128129
R.id.remove_favorite -> removeFavorite()
129-
R.id.go_to_favorite -> goToFavorite()
130130
R.id.set_as_home -> setAsHome()
131131
R.id.temporarily_show_hidden -> temporarilyShowHidden()
132132
R.id.settings -> startActivity(Intent(this, SettingsActivity::class.java))
@@ -173,7 +173,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
173173
}
174174
}
175175

176-
RadioGroupDialog(this, items, currFavoriteIndex) {
176+
RadioGroupDialog(this, items, currFavoriteIndex, R.string.go_to_favorite) {
177177
openPath(it.toString())
178178
}
179179
}

app/src/main/res/menu/menu.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
android:icon="@drawable/ic_home"
77
android:title="@string/go_to_home_folder"
88
app:showAsAction="ifRoom"/>
9+
<item
10+
android:id="@+id/go_to_favorite"
11+
android:icon="@drawable/ic_open"
12+
android:title="@string/go_to_favorite"
13+
app:showAsAction="ifRoom"/>
914
<item
1015
android:id="@+id/sort"
1116
android:icon="@drawable/ic_sort"
@@ -21,10 +26,6 @@
2126
android:icon="@drawable/ic_star_on"
2227
android:title="@string/remove_from_favorites"
2328
app:showAsAction="ifRoom"/>
24-
<item
25-
android:id="@+id/go_to_favorite"
26-
android:title="@string/go_to_favorite"
27-
app:showAsAction="never"/>
2829
<item
2930
android:id="@+id/set_as_home"
3031
android:title="@string/set_as_home_folder"

0 commit comments

Comments
 (0)