moved some preferences around & fixed app crashing when u leave format card while its updating
This commit is contained in:
parent
c28c2a6848
commit
c57cf33568
3 changed files with 26 additions and 24 deletions
|
|
@ -158,14 +158,16 @@ class FormatSelectionBottomSheetDialog(private val items: List<DownloadItem?>, p
|
|||
shimmers.visibility = View.GONE
|
||||
shimmers.stopShimmer()
|
||||
}catch (e: Exception){
|
||||
refreshBtn.isEnabled = true
|
||||
refreshBtn.text = getString(R.string.update_formats)
|
||||
linearLayout.visibility = View.VISIBLE
|
||||
shimmers.visibility = View.GONE
|
||||
shimmers.stopShimmer()
|
||||
runCatching {
|
||||
refreshBtn.isEnabled = true
|
||||
refreshBtn.text = getString(R.string.update_formats)
|
||||
linearLayout.visibility = View.VISIBLE
|
||||
shimmers.visibility = View.GONE
|
||||
shimmers.stopShimmer()
|
||||
|
||||
e.printStackTrace()
|
||||
Toast.makeText(context, getString(R.string.error_updating_formats), Toast.LENGTH_SHORT).show()
|
||||
e.printStackTrace()
|
||||
Toast.makeText(context, getString(R.string.error_updating_formats), Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,4 +36,21 @@
|
|||
android:key="high_contrast"
|
||||
app:summary="@string/pure_theme_summary"
|
||||
app:title="@string/high_contrast" />
|
||||
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:widgetLayout="@layout/preferece_material_switch"
|
||||
app:defaultValue="false"
|
||||
android:icon="@drawable/baseline_recommend_24"
|
||||
android:key="home_recommendations"
|
||||
app:summary="@string/video_recommendations_summary"
|
||||
app:title="@string/video_recommendations" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="Home"
|
||||
android:entries="@array/start_destination"
|
||||
android:entryValues="@array/start_destination_values"
|
||||
app:icon="@drawable/baseline_add_to_home_screen_24"
|
||||
app:key="start_destination"
|
||||
app:title="@string/preferred_home_screen" />
|
||||
</PreferenceScreen>
|
||||
|
|
@ -54,23 +54,6 @@
|
|||
app:summary="@string/preferred_search_engine_summary"
|
||||
app:title="@string/preferred_search_engine" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="Home"
|
||||
android:entries="@array/start_destination"
|
||||
android:entryValues="@array/start_destination_values"
|
||||
app:icon="@drawable/baseline_add_to_home_screen_24"
|
||||
app:key="start_destination"
|
||||
app:title="@string/preferred_home_screen" />
|
||||
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:widgetLayout="@layout/preferece_material_switch"
|
||||
app:defaultValue="false"
|
||||
android:icon="@drawable/baseline_recommend_24"
|
||||
android:key="home_recommendations"
|
||||
app:summary="@string/video_recommendations_summary"
|
||||
app:title="@string/video_recommendations" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue=""
|
||||
android:entries="@array/countries"
|
||||
|
|
|
|||
Loading…
Reference in a new issue