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.visibility = View.GONE
|
||||||
shimmers.stopShimmer()
|
shimmers.stopShimmer()
|
||||||
}catch (e: Exception){
|
}catch (e: Exception){
|
||||||
refreshBtn.isEnabled = true
|
runCatching {
|
||||||
refreshBtn.text = getString(R.string.update_formats)
|
refreshBtn.isEnabled = true
|
||||||
linearLayout.visibility = View.VISIBLE
|
refreshBtn.text = getString(R.string.update_formats)
|
||||||
shimmers.visibility = View.GONE
|
linearLayout.visibility = View.VISIBLE
|
||||||
shimmers.stopShimmer()
|
shimmers.visibility = View.GONE
|
||||||
|
shimmers.stopShimmer()
|
||||||
|
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
Toast.makeText(context, getString(R.string.error_updating_formats), Toast.LENGTH_SHORT).show()
|
Toast.makeText(context, getString(R.string.error_updating_formats), Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,21 @@
|
||||||
android:key="high_contrast"
|
android:key="high_contrast"
|
||||||
app:summary="@string/pure_theme_summary"
|
app:summary="@string/pure_theme_summary"
|
||||||
app:title="@string/high_contrast" />
|
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>
|
</PreferenceScreen>
|
||||||
|
|
@ -54,23 +54,6 @@
|
||||||
app:summary="@string/preferred_search_engine_summary"
|
app:summary="@string/preferred_search_engine_summary"
|
||||||
app:title="@string/preferred_search_engine" />
|
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
|
<ListPreference
|
||||||
android:defaultValue=""
|
android:defaultValue=""
|
||||||
android:entries="@array/countries"
|
android:entries="@array/countries"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue