New feature open news settings via settings lmao

This commit is contained in:
gdlbo
2022-06-07 11:56:23 +03:00
parent eaaf7e2bbf
commit 99d7f06981
2 changed files with 30 additions and 1 deletions
@@ -1,7 +1,14 @@
package ru.vtosters.lite.ui.fragments;
import android.os.Bundle;
import static ru.vtosters.lite.utils.Globals.getContext;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import com.vk.navigation.Navigator;
import com.vk.newsfeed.NewsfeedSettingsFragment;
import com.vtosters.lite.R;
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
@@ -10,5 +17,23 @@ public class FeedFragment extends MaterialPreferenceToolbarFragment {
public void b(Bundle bundle) {
super.b(bundle);
a(R.xml.preferences_feed);
prefs();
}
private void prefs() {
a("officialnewssett").a(new FeedFragment.openofficialsett());
}
public class openofficialsett implements Preference.c {
openofficialsett() {
}
@Override // android.support.v7.preference.Preference.c
public boolean a(Preference preference) {
Context context = getContext();
Intent a2 = new Navigator(NewsfeedSettingsFragment.class).a(context);
context.startActivity(a2);
return true;
}
}
}
+4
View File
@@ -100,5 +100,9 @@
android:key="feedcache"
android:summary="@string/feed_other_cache_summary"
android:title="@string/vtlfeedcache" />
<Preference
android:key="officialnewssett"
android:summary="Официальные настройки новостей встроенные в клиент"
android:title="Встроенные настройки новостей" />
</PreferenceCategory>
</PreferenceScreen>