This commit is contained in:
gdlbo
2024-03-29 10:47:18 +03:00
parent 2d1867197f
commit 126f5259d1
2 changed files with 19 additions and 4 deletions
@@ -42,11 +42,13 @@ public class CatalogJsonInjector {
removeUnsupportedLayouts(blocks);
fetchCatalogId("https://vk.com/audio?section=my_playlists", oldItems);
if (Preferences.getBoolValue("playlistsCatalogs", true)) {
fetchCatalogId("https://vk.com/audio?section=my_playlists", oldItems);
fetchCatalogId("https://vk.com/audio?section=albums", oldItems);
fetchCatalogId("https://vk.com/audio?section=albums", oldItems);
}
if (Preferences.sendMusicMetrics() && Preferences.getBoolValue("playStatsCatalog", true)) {
if (Preferences.sendMusicMetrics() && Preferences.getBoolValue("playStatsCatalog", false)) {
fetchCatalogId("https://vk.com/audio?section=recent", oldItems);
}
@@ -225,7 +225,7 @@ public class MusicFragment extends TrackedMaterialPreferenceToolbarFragment {
"Список истории прослушиваний",
"Показывать вкладку истории прослушиваний в музыкальном разделе\n\nОтключение ускорит открытие музыкального раздела при медленном интернете",
null,
true,
false,
(preference, o) -> {
Preferences.getPreferences().edit().putBoolean("playStatsCatalog", (boolean) o).apply();
return true;
@@ -339,6 +339,19 @@ public class MusicFragment extends TrackedMaterialPreferenceToolbarFragment {
list.setVisible(!Preferences.getBoolValue("useOldAppVer", false));
getPreferenceScreen().addPreference(list);
PreferenceFragmentUtils.addMaterialSwitchPreference(
getPreferenceScreen(),
"playlistsCatalogs",
"Списки плейлистов",
"Показывать вкладку плейлистов и альбомов прослушиваний в музыкальном разделе\n\nОтключение ускорит открытие музыкального раздела при медленном интернете",
null,
true,
(preference, o) -> {
Preferences.getPreferences().edit().putBoolean("playStatsCatalog", (boolean) o).apply();
return true;
}
).setVisible(!getBoolValue("useOldAppVer", false));
}
private void lastfmAuth(Context ctx) {