mirror of https://github.com/NekoX-Dev/NekoX.git
feat: take GIF as video
This commit is contained in:
parent
731de1efec
commit
1dbe1e1014
|
@ -9798,7 +9798,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
MessagesController.getInstance(currentAccount).loadDialogPhotos(avatarsDialogId, 80, 0, true, classGuid);
|
||||
}
|
||||
}
|
||||
if (currentMessageObject != null && currentMessageObject.isVideo() || currentBotInlineResult != null && (currentBotInlineResult.type.equals("video") || MessageObject.isVideoDocument(currentBotInlineResult.document)) || pageBlocksAdapter != null && pageBlocksAdapter.isVideo(index)) {
|
||||
if (currentMessageObject != null && currentMessageObject.isVideo() || (currentMessageObject.isGif() && NekoConfig.takeGIFasVideo) || currentBotInlineResult != null && (currentBotInlineResult.type.equals("video") || MessageObject.isVideoDocument(currentBotInlineResult.document)) || pageBlocksAdapter != null && pageBlocksAdapter.isVideo(index)) {
|
||||
playerAutoStarted = true;
|
||||
onActionClick(false);
|
||||
} else if (!imagesArrLocals.isEmpty()) {
|
||||
|
|
|
@ -145,11 +145,12 @@ public class NekoConfig {
|
|||
public static boolean avatarBackgroundBlur;
|
||||
public static boolean avatarBackgroundDarken;
|
||||
public static boolean disableTrending;
|
||||
public static boolean dontSendGreetingSticker;
|
||||
public static boolean takeGIFasVideo;
|
||||
|
||||
public static boolean disableAutoDownloadingWin32Executable;
|
||||
public static boolean disableAutoDownloadingArchive;
|
||||
|
||||
public static boolean dontSendGreetingSticker;
|
||||
|
||||
public static String getOpenPGPAppName() {
|
||||
|
||||
|
@ -309,12 +310,12 @@ public class NekoConfig {
|
|||
increaseVoiceMessageQuality = preferences.getBoolean("increaseVoiceMessageQuality", true);
|
||||
acceptSecretChat = preferences.getBoolean("acceptSecretChat", true);
|
||||
disableTrending = preferences.getBoolean("disableTrending", true);
|
||||
dontSendGreetingSticker = preferences.getBoolean("dontSendGreetingSticker", false);
|
||||
takeGIFasVideo = preferences.getBoolean("takeGIFasVideo", false);
|
||||
|
||||
disableAutoDownloadingWin32Executable = preferences.getBoolean("disableAutoDownloadingWin32Executable", true);
|
||||
disableAutoDownloadingArchive = preferences.getBoolean("disableAutoDownloadingArchive", true);
|
||||
|
||||
dontSendGreetingSticker = preferences.getBoolean("dontSendGreetingSticker", false);
|
||||
|
||||
}
|
||||
|
||||
public static void toggleShowAddToSavedMessages() {
|
||||
|
@ -799,6 +800,10 @@ public class NekoConfig {
|
|||
preferences.edit().putBoolean("dontSendGreetingSticker", dontSendGreetingSticker = !dontSendGreetingSticker).apply();
|
||||
}
|
||||
|
||||
public static void toggleTakeGIFasVideo() {
|
||||
preferences.edit().putBoolean("takeGIFasVideo", takeGIFasVideo = !takeGIFasVideo).apply();
|
||||
}
|
||||
|
||||
private static final String EMOJI_FONT_AOSP = "NotoColorEmoji.ttf";
|
||||
|
||||
public static Typeface getSystemEmojiTypeface() {
|
||||
|
|
|
@ -75,6 +75,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
|||
private int disableProximityEventsRow;
|
||||
private int disableTrendingRow;
|
||||
private int dontSendGreetingStickerRow;
|
||||
private int takeGIFasVideoRow;
|
||||
|
||||
private int mapPreviewRow;
|
||||
private int messageMenuRow;
|
||||
|
@ -275,6 +276,11 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
|||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(NekoConfig.dontSendGreetingSticker);
|
||||
}
|
||||
} else if (position == takeGIFasVideoRow) {
|
||||
NekoConfig.toggleTakeGIFasVideo();
|
||||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(NekoConfig.takeGIFasVideo);
|
||||
}
|
||||
} else if (position == win32Row) {
|
||||
NekoConfig.toggleDisableAutoDownloadingWin32Executable();
|
||||
if (view instanceof TextCheckCell) {
|
||||
|
@ -323,6 +329,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
|||
disableProximityEventsRow = rowCount++;
|
||||
disableTrendingRow = rowCount++;
|
||||
dontSendGreetingStickerRow = rowCount++;
|
||||
takeGIFasVideoRow = rowCount++;
|
||||
|
||||
mapPreviewRow = rowCount++;
|
||||
messageMenuRow = rowCount++;
|
||||
|
@ -684,6 +691,8 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
|||
textCell.setTextAndCheck(LocaleController.getString("DisableTrending", R.string.DisableTrending), NekoConfig.disableTrending, true);
|
||||
} else if (position == dontSendGreetingStickerRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("DontSendGreetingSticker", R.string.DontSendGreetingSticker), NekoConfig.dontSendGreetingSticker, true);
|
||||
} else if (position == takeGIFasVideoRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("TakeGIFasVideo", R.string.TakeGIFasVideo), NekoConfig.takeGIFasVideo, true);
|
||||
} else if (position == win32Row) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("Win32ExecutableFiles", R.string.Win32ExecutableFiles), !NekoConfig.disableAutoDownloadingWin32Executable, true);
|
||||
} else if (position == archiveRow) {
|
||||
|
|
|
@ -111,5 +111,6 @@
|
|||
<string name="ProviderYouDao">YouDao Translate</string>
|
||||
<string name="pressTitleToOpenAllChats">Press title to open \"All Chats\" tab</string>
|
||||
<string name="DontSendGreetingSticker">Don\'t send greeting sticker</string>
|
||||
<string name="TakeGIFasVideo">Take GIF as Video</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue