remove "do not get ads"

This commit is contained in:
Erik Kiznov
2022-09-24 23:22:08 +05:00
parent 291097e852
commit 0447c580e4
4 changed files with 12 additions and 26 deletions
@@ -53,7 +53,7 @@ public class NewsfeedHook {
params.add("photo");
params.add("photo_tag");
if (!friendsrecomm() && !getBoolValue("donotgetads", false)) {
if (!friendsrecomm()) {
params.add("friends_recomm");
}
@@ -62,7 +62,7 @@ public class NewsfeedHook {
params.add("promo_button");
}
if (!authorsrecomm() && !getBoolValue("donotgetads", false)) {
if (!authorsrecomm()) {
params.add("authors_rec");
}
@@ -108,20 +108,17 @@ public class NewsfeedHook {
}
public static void adsParams(HashSet<String> hashSet) {
if (getBoolValue("donotgetads", false)) {
if (ads())
hashSet.add("ads_disabled");
} else {
hashSet.add("ads_app");
hashSet.add("ads_site");
hashSet.add("ads_post");
if (!adsslider()) {
hashSet.add("ads_app_slider");
}
hashSet.add("ads_site_slider");
hashSet.add("ads_app_video");
hashSet.add("ads_post_pretty_cards");
hashSet.add("ads_post_snippet_video");
} // ads will be filtered from another hook after this
hashSet.add("ads_app");
hashSet.add("ads_site");
hashSet.add("ads_post");
if (!adsslider())
hashSet.add("ads_app_slider");
hashSet.add("ads_site_slider");
hashSet.add("ads_app_video");
hashSet.add("ads_post_pretty_cards");
hashSet.add("ads_post_snippet_video");
}
public static boolean isPowerSaveMode() {
-3
View File
@@ -6251,9 +6251,6 @@
<string name="contact_sync_enabled">Включена</string>
<string name="contact_sync_disabled">Отключена</string>
<string name="donotgetads_title">Не пытаться получать рекламу</string>
<string name="donotgetads_summ">Не запрашивать рекламу и рекомендации\n\nМогут быть проблемы</string>
<string name="force_disable_psm_title">Не отправлять информацию о батарее</string>
<string name="force_disable_psm_summ">Включение этой функции скроет информацию о состоянии вашего устройства в режиме экономии батареи и ВКонтакте будет отправлять вам медиаконтент без сильного сжатия и блюра</string>
-3
View File
@@ -6389,9 +6389,6 @@ May look like a fake leaving the online"</string>
<string name="contact_sync_enabled">Enabled</string>
<string name="contact_sync_disabled">Disabled</string>
<string name="donotgetads_title">Don\'t try to get ads</string>
<string name="donotgetads_summ">Don\'t request ads and recommendations\n\nMay cause problems</string>
<string name="force_disable_psm_title">Don\'t send battery information</string>
<string name="force_disable_psm_summ">Enabling this feature will hide information about the state of your device in battery saving mode and VK will send you media content without strong compression and blur</string>
-5
View File
@@ -131,11 +131,6 @@
<Preference
android:key="newsfeedlistmanager_reset"
android:title="@string/newsfeedlistmanager_reset_title" />
<com.vtosters.lite.ui.MaterialSwitchPreference
android:defaultValue="false"
android:key="donotgetads"
android:summary="@string/donotgetads_summ"
android:title="@string/donotgetads_title" />
<com.vtosters.lite.ui.MaterialSwitchPreference
android:defaultValue="false"
android:key="force_disable_psm"