Skip to content

Commit 54759a8

Browse files
Test Update Languages
1 parent 044355a commit 54759a8

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

app/src/main/java/com/github/droidworksstudio/mlauncher/ui/SettingsFragment.kt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.Setti
6161
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsItemFont
6262
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsSliderItem
6363
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsTextButton
64+
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsThreeButtonRow
6465
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsToggle
6566
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsTopView
66-
import com.github.droidworksstudio.mlauncher.ui.compose.SettingsComposable.SettingsThreeButtonRow
6767

6868
class SettingsFragment : Fragment() {
6969

@@ -122,7 +122,10 @@ class SettingsFragment : Fragment() {
122122
binding.scrollView.setBackgroundColor(hex)
123123
}
124124

125-
private fun <T> createTypefaceMap(context: Context, typeMappings: Map<T, Int>): Map<T, Typeface?> {
125+
private fun <T> createTypefaceMap(
126+
context: Context,
127+
typeMappings: Map<T, Int>
128+
): Map<T, Typeface?> {
126129
return typeMappings.mapValues { (_, fontResId) ->
127130
ResourcesCompat.getFont(context, fontResId)
128131
}
@@ -166,7 +169,8 @@ class SettingsFragment : Fragment() {
166169
Constants.Fonts.SourceCodePro to R.font.source_code_pro
167170
)
168171

169-
val typefaceMapFonts: Map<Constants.Fonts, Typeface?> = createTypefaceMap(requireActivity(), typeMappings)
172+
val typefaceMapFonts: Map<Constants.Fonts, Typeface?> =
173+
createTypefaceMap(requireActivity(), typeMappings)
170174

171175

172176

@@ -195,10 +199,10 @@ class SettingsFragment : Fragment() {
195199
resetDefaultLauncher(requireContext())
196200
}
197201
SettingsTextButton(
198-
stringResource(R.string.reorder_apps),
202+
stringResource(R.string.favorite_apps),
199203
fontSize = iconFs
200204
) {
201-
showReorderApps()
205+
showFavoriteApps()
202206
}
203207
}
204208
SettingsArea(
@@ -503,7 +507,7 @@ class SettingsFragment : Fragment() {
503507
) { toggleShowBattery() }
504508
},
505509
{ _, onChange ->
506-
if(prefs.showBattery) {
510+
if (prefs.showBattery) {
507511
SettingsToggle(
508512
title = stringResource(R.string.show_battery_icon),
509513
fontSize = iconFs,
@@ -917,10 +921,10 @@ class SettingsFragment : Fragment() {
917921
)
918922
}
919923

920-
private fun showReorderApps() {
924+
private fun showFavoriteApps() {
921925
viewModel.getHiddenApps()
922926
findNavController().navigate(
923-
R.id.action_settingsFragment_to_appListReorderFragment,
927+
R.id.action_settingsFragment_to_appFavoriteFragment,
924928
bundleOf("flag" to AppDrawerFlag.ReorderApps.toString())
925929
)
926930
}

app/src/main/res/navigation/nav_graph.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
</fragment>
4444

4545
<fragment
46-
android:id="@+id/appListReorderFragment"
46+
android:id="@+id/appFavoriteFragment"
4747
android:name="com.github.droidworksstudio.mlauncher.ui.FavoriteFragment"
4848
android:label="app_list_fragment"
49-
tools:layout="@layout/fragment_favorite"></fragment>
49+
tools:layout="@layout/fragment_favorite" />
5050

5151
<fragment
5252
android:id="@+id/settingsFragment"
@@ -62,8 +62,8 @@
6262
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
6363

6464
<action
65-
android:id="@+id/action_settingsFragment_to_appListReorderFragment"
66-
app:destination="@id/appListReorderFragment"
65+
android:id="@+id/action_settingsFragment_to_appFavoriteFragment"
66+
app:destination="@id/appFavoriteFragment"
6767
app:enterAnim="@anim/nav_default_enter_anim"
6868
app:exitAnim="@anim/nav_default_exit_anim"
6969
app:popEnterAnim="@anim/nav_default_pop_enter_anim"

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!-- Home Strings -->
1818
<string name="hidden_apps">Hidden Apps</string>
19-
<string name="favorite_apps">Re-Order Apps</string>
19+
<string name="favorite_apps">Favorite Apps</string>
2020
<string name="set_as_default_launcher">Set as Default Launcher</string>
2121
<string name="change_default_launcher">Change Default Launcher</string>
2222

0 commit comments

Comments
 (0)