mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-22 02:58:26 +00:00
Only show GIF metadata warning once
This commit is contained in:
parent
79e5e6fc53
commit
40200fe5e1
@ -1894,6 +1894,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
case AttachmentTypeSelector.TAKE_PHOTO:
|
case AttachmentTypeSelector.TAKE_PHOTO:
|
||||||
attachmentManager.capturePhoto(this, TAKE_PHOTO); break;
|
attachmentManager.capturePhoto(this, TAKE_PHOTO); break;
|
||||||
case AttachmentTypeSelector.ADD_GIF:
|
case AttachmentTypeSelector.ADD_GIF:
|
||||||
|
boolean hasSeenGIFMetaDataWarning = TextSecurePreferences.hasSeenGIFMetaDataWarning(this);
|
||||||
|
if (!hasSeenGIFMetaDataWarning) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle("Search GIFs?");
|
builder.setTitle("Search GIFs?");
|
||||||
builder.setMessage("You will not have full metadata protection when sending GIFs.");
|
builder.setMessage("You will not have full metadata protection when sending GIFs.");
|
||||||
@ -1903,6 +1905,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
});
|
});
|
||||||
builder.setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss());
|
builder.setNegativeButton("Cancel", (dialog, which) -> dialog.dismiss());
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
|
TextSecurePreferences.setHasSeenGIFMetaDataWarning(this);
|
||||||
|
} else {
|
||||||
|
AttachmentManager.selectGif(this, PICK_GIF, !isSecureText);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1305,6 +1305,14 @@ public class TextSecurePreferences {
|
|||||||
setLongPreference(context, "last_profile_picture_upload", newValue);
|
setLongPreference(context, "last_profile_picture_upload", newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasSeenGIFMetaDataWarning(Context context) {
|
||||||
|
return getBooleanPreference(context, "has_seen_gif_metadata_warning", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setHasSeenGIFMetaDataWarning(Context context) {
|
||||||
|
setBooleanPreference(context, "has_seen_gif_metadata_warning", true);
|
||||||
|
}
|
||||||
|
|
||||||
public static void clearAll(Context context) {
|
public static void clearAll(Context context) {
|
||||||
PreferenceManager.getDefaultSharedPreferences(context).edit().clear().commit();
|
PreferenceManager.getDefaultSharedPreferences(context).edit().clear().commit();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user