some profile inj fixes

This commit is contained in:
gdlbo
2022-07-24 16:16:17 +03:00
parent c18a3dde9e
commit 06d5b1a779
2 changed files with 16 additions and 10 deletions
@@ -10,6 +10,7 @@ import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Globals.getUserId;
import static ru.vtosters.lite.utils.Globals.getUserToken;
import static ru.vtosters.lite.utils.Globals.isVKTester;
import static ru.vtosters.lite.utils.Newsfeed.checkCaption;
import static ru.vtosters.lite.utils.Newsfeed.checkCopyright;
import static ru.vtosters.lite.utils.Newsfeed.isBadNews;
@@ -64,7 +65,9 @@ public class JsonInjectors{
newItem.put(donateRecomm());
}
newItem.put(vktesters(id));
if (!orig.has("type") && isVKTester()) {
newItem.put(vktesters(id));
}
orig.put("buttons", newItem);
@@ -113,7 +116,7 @@ public class JsonInjectors{
}
public static JSONObject vktesters(int id) throws JSONException{
var title = "Профиль VK Testers";
var title = "Карточка Тестера";
var text_color = "2D81E0";
var link = "https://static.vk.com/bugs?lang=" + LangUtils.a() + "#/reporter" + id;
@@ -17,6 +17,7 @@ import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Globals.getUserPhoto;
import static ru.vtosters.lite.utils.Globals.getUsername;
import static ru.vtosters.lite.utils.Globals.isGmsInstalled;
import static ru.vtosters.lite.utils.Globals.isVKTester;
import static ru.vtosters.lite.utils.Globals.restartApplication;
import static ru.vtosters.lite.utils.Preferences.DoNotUseOldIcons;
import static ru.vtosters.lite.utils.Preferences.ads;
@@ -233,14 +234,16 @@ public class VTSettings extends MaterialPreferenceToolbarFragment{
return false;
});
addPreference(this, "", Globals.getString("bugs"), "", !DoNotUseOldIcons() ? "ic_bug_24" : "ic_bug_outline_28", preference -> {
Context context = getContext();
VKUIwrapper.officalLinks("bugs");
Intent a2 = new Navigator(VKUIwrapper.class).b(context);
a2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(a2);
return false;
});
if (isVKTester()) {
addPreference(this, "", Globals.getString("bugs"), "", !DoNotUseOldIcons() ? "ic_bug_24" : "ic_bug_outline_28", preference -> {
Context context = getContext();
VKUIwrapper.officalLinks("bugs");
Intent a2 = new Navigator(VKUIwrapper.class).b(context);
a2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(a2);
return false;
});
}
addPreference(this, "", Globals.getString("vtssfs"), ssfs, !DoNotUseOldIcons() ? "ic_link_24" : "ic_link_circle_outline_28", preference -> {
Context context = getContext();