fixes
This commit is contained in:
@@ -36,7 +36,7 @@ public class InstallGMS {
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
edit().putBoolean("showAlertGms", false).apply();
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(InstallGMSFragment.class).a(context);
|
||||
Intent a2 = new Navigator(InstallGMSFragment.class).b(context);
|
||||
context.startActivity(a2);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ public class VKIDProtection {
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setNeutralButton(getString("vkiddisable"), (dialogInterface, i) -> {
|
||||
edit().putBoolean("showAlertVkId", false).apply();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(activity);
|
||||
Intent a2 = new Navigator(VKConnect.class).b(activity);
|
||||
activity.startActivity(a2);
|
||||
});
|
||||
if (getBoolValue("showAlertVkId", true)) {
|
||||
|
||||
@@ -24,8 +24,6 @@ import static ru.vtosters.lite.utils.Preferences.shortinfo;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
import static ru.vtosters.lite.utils.Themes.applyTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getDarkTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getImDarkTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getImLightTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getLightTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.setTheme;
|
||||
|
||||
@@ -38,14 +36,11 @@ import android.os.Bundle;
|
||||
|
||||
import com.aefyr.tsg.g2.TelegramStickersService;
|
||||
import com.vk.about.AboutAppFragment;
|
||||
import com.vk.articles.preload.WebCachePreloader;
|
||||
import com.vk.core.ui.themes.VKThemeHelper;
|
||||
import com.vk.identity.fragments.IdentityListFragment;
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.notifications.settings.NotificationsSettingsFragment;
|
||||
import com.vk.webapp.fragments.PrivacyFragment;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.data.ThemeTracker;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
import com.vtosters.lite.fragments.SettingsAccountFragment;
|
||||
import com.vtosters.lite.fragments.SettingsGeneralFragment;
|
||||
|
||||
@@ -82,15 +82,15 @@ public class Globals {
|
||||
} // Get pref value as string
|
||||
|
||||
public static int getUserId() {
|
||||
return VKAccountManager.b().a();
|
||||
return VKAccountManager.d().D0();
|
||||
} // Current UserId
|
||||
|
||||
public static String getUserSecret() {
|
||||
return VKAccountManager.b().c();
|
||||
return VKAccountManager.d().l0();
|
||||
}
|
||||
|
||||
public static String getUserToken() {
|
||||
return VKAccountManager.b().b();
|
||||
return VKAccountManager.d().b();
|
||||
}
|
||||
|
||||
public static SharedPreferences.Editor edit() {
|
||||
@@ -102,15 +102,15 @@ public class Globals {
|
||||
} // Delete and reload msg cache
|
||||
|
||||
public static int getUserID(UserProfile userProfile) {
|
||||
return userProfile.n;
|
||||
return userProfile.b;
|
||||
} // UserId Profile via userProfile
|
||||
|
||||
public static String getUserFirstName(UserProfile userProfile) {
|
||||
return userProfile.p;
|
||||
return userProfile.d;
|
||||
}
|
||||
|
||||
public static String getUserLastName(UserProfile userProfile) {
|
||||
return userProfile.o;
|
||||
return userProfile.c;
|
||||
}
|
||||
|
||||
public static int getUserID(ExtendedUserProfile extendedUserProfile) {
|
||||
@@ -180,7 +180,7 @@ public class Globals {
|
||||
Context ctx = getContext();
|
||||
PackageManager pm = ctx.getPackageManager();
|
||||
|
||||
Intent intent = new Navigator(Class).a(ctx);
|
||||
Intent intent = new Navigator(Class).b(ctx);
|
||||
Intent mainIntent = Intent.makeRestartActivityTask(intent.getComponent());
|
||||
ctx.startActivity(mainIntent);
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.vtosters.lite.fragments.gifts.BirthdaysFragment;
|
||||
import com.vtosters.lite.fragments.lives.LivesTabsFragment;
|
||||
import com.vtosters.lite.fragments.money.MoneyTransfersFragment;
|
||||
import com.vtosters.lite.fragments.p2.DocumentsViewFragment;
|
||||
import com.vtosters.lite.fragments.s2.AllGroupsFragment;
|
||||
import com.vtosters.lite.fragments.t2.c.DialogsFragment;
|
||||
import com.vtosters.lite.fragments.y2.VideosFragment;
|
||||
|
||||
@@ -93,12 +94,12 @@ public class Newsfeed {
|
||||
} // Get needed filter list from assets
|
||||
|
||||
public static boolean injectFilters(JSONObject jSONObject) {
|
||||
String optString = jSONObject.optString(NavigatorKeys.j, "");
|
||||
String optString = jSONObject.optString(NavigatorKeys.e, "");
|
||||
if (!ads(optString) && !checkCopyright(optString) && !authors_rec(optString) && !recomm(optString) && !friendrecomm(optString)) {
|
||||
String optString2 = jSONObject.optString("post_type", "");
|
||||
if (!ads(optString2) && !authors_rec(optString2) && !recomm(optString2) && !friendrecomm(optString2)) {
|
||||
String optString3 = jSONObject.optString("filters", "");
|
||||
if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.x, "")) || captions(jSONObject)) {
|
||||
if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.h0, "")) || captions(jSONObject)) {
|
||||
return false;
|
||||
}
|
||||
return !AD(jSONObject);
|
||||
@@ -117,7 +118,7 @@ public class Newsfeed {
|
||||
if (Preferences.captions()) {
|
||||
return true;
|
||||
}
|
||||
return (jSONObject2.getString(NavigatorKeys.j).equals("explorebait") && postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.j).equals("shared") && postsrecomm()) || ((jSONObject.getString(NavigatorKeys.j).equals("digest") && postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.j).equals("commented") && postsrecomm()) || (jSONObject2.getString(NavigatorKeys.j).equals("voted") && postsrecomm()))));
|
||||
return (jSONObject2.getString(NavigatorKeys.e).equals("explorebait") && postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.e).equals("shared") && postsrecomm()) || ((jSONObject.getString(NavigatorKeys.e).equals("digest") && postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.e).equals("commented") && postsrecomm()) || (jSONObject2.getString(NavigatorKeys.e).equals("voted") && postsrecomm()))));
|
||||
} catch (JSONException unused) {
|
||||
return false;
|
||||
}
|
||||
@@ -198,7 +199,7 @@ public class Newsfeed {
|
||||
case "messenger":
|
||||
return DialogsFragment.class;
|
||||
case "groups":
|
||||
return GroupsFragment.class;
|
||||
return AllGroupsFragment.class;
|
||||
case "music":
|
||||
return MusicFragment.class;
|
||||
case "friends":
|
||||
|
||||
@@ -38,21 +38,21 @@ public class OpusLoader {
|
||||
timetracker = System.currentTimeMillis();
|
||||
return 1;
|
||||
}
|
||||
return MediaNative.nativeAudioStartRecord(str);
|
||||
return MediaNative.audioStartRecord(str);
|
||||
}
|
||||
|
||||
public static int AudioWriteFrameBridge(ByteBuffer buffer, int length) {
|
||||
if (isReadyToUse()) {
|
||||
// Init custom AudioWriteFrame
|
||||
}
|
||||
return MediaNative.nativeAudioWriteFrame(buffer, length);
|
||||
return MediaNative.audioWriteFrame(buffer, length);
|
||||
}
|
||||
|
||||
public static void AudioStopRecordBridge() {
|
||||
if (isReadyToUse()) {
|
||||
// Init custom AudioStopRecord
|
||||
}
|
||||
MediaNative.nativeAudioStopRecord();
|
||||
MediaNative.audioStopRecord();
|
||||
}
|
||||
|
||||
private static boolean isReadyToUse() {
|
||||
|
||||
@@ -52,8 +52,8 @@ public class Themes {
|
||||
public static void setTheme(Activity activity) {
|
||||
VKThemeHelper.b(activity, getCenterScreenCoords());
|
||||
ThemeTracker.a();
|
||||
WebCachePreloader.e(); // apply changed theme
|
||||
}
|
||||
WebCachePreloader.e();
|
||||
} // apply changed theme
|
||||
|
||||
public static boolean isDarkTheme() {
|
||||
return VKThemeHelper.r();
|
||||
@@ -88,7 +88,7 @@ public class Themes {
|
||||
} // Toolbar/Header background
|
||||
|
||||
public static int getHeaderText() {
|
||||
return VKThemeHelper.a(R.attr.header_text);
|
||||
return getColorFromAttr(R.attr.header_text);
|
||||
} // Header/Toolbar color text
|
||||
|
||||
public static int getAmoledTheme() {
|
||||
@@ -390,11 +390,11 @@ public class Themes {
|
||||
case Configuration.UI_MODE_NIGHT_UNDEFINED:
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
edit().putBoolean("isdark", false).commit();
|
||||
applyTheme(getLightTheme(), getImLightTheme());
|
||||
applyTheme(getLightTheme());
|
||||
break;
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
edit().putBoolean("isdark", true).commit();
|
||||
applyTheme(getDarkTheme(), getImDarkTheme());
|
||||
applyTheme(getDarkTheme());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user