added identity frag support
This commit is contained in:
@@ -9,6 +9,7 @@ import com.aefyr.tsg.g2.TelegramStickersPack;
|
||||
import com.aefyr.tsg.g2.TelegramStickersService;
|
||||
import com.vk.about.AboutAppFragment;
|
||||
import com.vk.balance.BalanceFragment;
|
||||
import com.vk.identity.fragments.IdentityListFragment;
|
||||
import com.vk.notifications.settings.NotificationsSettingsFragment;
|
||||
import com.vk.webapp.fragments.PrivacyFragment;
|
||||
import com.vtosters.lite.MainActivity;
|
||||
@@ -271,6 +272,20 @@ public class VTSettings extends TrackedMaterialPreferenceToolbarFragment impleme
|
||||
}
|
||||
);
|
||||
|
||||
if (VKAccountManager.d().N0()) {
|
||||
PreferenceFragmentUtils.addPreference(
|
||||
getPreferenceScreen(),
|
||||
"",
|
||||
requireContext().getString(R.string.identity_title),
|
||||
"",
|
||||
R.drawable.ic_services_outline_28,
|
||||
preference -> {
|
||||
NavigatorUtils.switchFragmentNavigator(requireContext(), new IdentityListFragment.a("menu").e());
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (AccountManagerUtils.isVKTester()) {
|
||||
PreferenceFragmentUtils.addPreference(
|
||||
getPreferenceScreen(),
|
||||
|
||||
@@ -15,6 +15,12 @@ public class NavigatorUtils {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void switchFragmentNavigator(Context context, Navigator fragmentClz) {
|
||||
var intent = fragmentClz
|
||||
.b(context)
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
/**
|
||||
* switch to settings for {@link Intent.ACTION_APPLICATION_PREFERENCES}*/
|
||||
public static void switchToSettings(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user