Don't show the link preview megaphone if previously disabled.

This commit is contained in:
Greyson Parrelli
2020-08-17 12:03:37 -04:00
parent 29b8fa5897
commit 08d5df70c2
2 changed files with 16 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ import androidx.core.app.NotificationCompat;
import org.greenrobot.eventbus.EventBus;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.jobmanager.impl.SqlCipherMigrationConstraintObserver;
import org.thoughtcrime.securesms.keyvalue.SettingsValues;
import org.thoughtcrime.securesms.lock.RegistrationLockReminders;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
@@ -419,8 +420,13 @@ public class TextSecurePreferences {
setBooleanPreference(context, TYPING_INDICATORS, enabled);
}
public static void setLinkPreviewsEnabled(Context context, boolean enabled) {
setBooleanPreference(context, LINK_PREVIEWS, enabled);
/**
* Only kept so that we can avoid showing the megaphone for the new link previews setting
* ({@link SettingsValues#isLinkPreviewsEnabled()}) when users upgrade. This can be removed after
* we stop showing the link previews megaphone.
*/
public static boolean wereLinkPreviewsEnabled(Context context) {
return getBooleanPreference(context, LINK_PREVIEWS, true);
}
public static boolean isGifSearchInGridLayout(Context context) {