0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-29 06:23:00 +00:00

revert back to first version

This commit is contained in:
cl-ement05 2021-05-29 15:34:05 +02:00
parent d7dfb27ca5
commit f98c21ddbe

View file

@ -62,18 +62,18 @@ class HomeFragment : BindingFragment<FragmentHomeBinding>() {
isFetching.observe(viewLifecycleOwner) { homeRefresh.isRefreshing = it } isFetching.observe(viewLifecycleOwner) { homeRefresh.isRefreshing = it }
val prefs = PreferenceManager.getDefaultSharedPreferences(context) val prefs = PreferenceManager.getDefaultSharedPreferences(context)
if (prefs.getInt("LastVersionCode", VERSION_CODE) < VERSION_CODE) { if (prefs.contains("LastVersionCode")) {
showDialog( if (prefs.getInt("LastVersionCode", -1) < VERSION_CODE) {
AppInfoDialog.newInstance( showDialog(
appName = getString(R.string.app_name), AppInfoDialog.newInstance(
appIcon = R.mipmap.ic_launcher, appName = getString(R.string.app_name),
changelog = manager.value?.string("changelog") appIcon = R.mipmap.ic_launcher,
changelog = manager.value?.string("changelog")
)
) )
) prefs.edit().putInt("LastVersionCode", VERSION_CODE).apply()
prefs.edit().putInt("LastVersionCode", VERSION_CODE).apply() }
} else { } else prefs.edit().putInt("LastVersionCode", VERSION_CODE).apply()
prefs.edit().putInt("LastVersionCode", VERSION_CODE).apply()
}
recyclerAppList.apply { recyclerAppList.apply {
layoutManager = LinearLayoutManager(requireActivity()) layoutManager = LinearLayoutManager(requireActivity())