mirror of https://github.com/NekoX-Dev/NekoX.git
feat: Hide time for stickers
This commit is contained in:
parent
17dd08d9ba
commit
b0f64e4eb1
|
@ -10427,7 +10427,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||||
if (!autoPlayingMedia || !MediaController.getInstance().isPlayingMessageAndReadyToDraw(currentMessageObject) && !transitionParams.animateBackgroundBoundsInner) {
|
if (!autoPlayingMedia || !MediaController.getInstance().isPlayingMessageAndReadyToDraw(currentMessageObject) && !transitionParams.animateBackgroundBoundsInner) {
|
||||||
drawOverlays(canvas);
|
drawOverlays(canvas);
|
||||||
}
|
}
|
||||||
if ((drawTime || !mediaBackground) && !forceNotDrawTime && !transitionParams.animateBackgroundBoundsInner && !(enterTransitionInPorgress && !currentMessageObject.isVoice())) {
|
if ((drawTime || !mediaBackground) && !forceNotDrawTime && !transitionParams.animateBackgroundBoundsInner && !(enterTransitionInPorgress && !currentMessageObject.isVoice()) && (!currentMessageObject.isAnyKindOfSticker() || !NekoConfig.hideTimeForSticker)) {
|
||||||
drawTime(canvas, 1f, false);
|
drawTime(canvas, 1f, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,7 @@ public class NekoConfig {
|
||||||
public static boolean avatarBackgroundDarken;
|
public static boolean avatarBackgroundDarken;
|
||||||
public static boolean disableTrending;
|
public static boolean disableTrending;
|
||||||
public static boolean dontSendGreetingSticker;
|
public static boolean dontSendGreetingSticker;
|
||||||
|
public static boolean hideTimeForSticker;
|
||||||
public static boolean takeGIFasVideo;
|
public static boolean takeGIFasVideo;
|
||||||
|
|
||||||
public static boolean disableAutoDownloadingWin32Executable;
|
public static boolean disableAutoDownloadingWin32Executable;
|
||||||
|
@ -313,6 +314,7 @@ public class NekoConfig {
|
||||||
acceptSecretChat = preferences.getBoolean("acceptSecretChat", true);
|
acceptSecretChat = preferences.getBoolean("acceptSecretChat", true);
|
||||||
disableTrending = preferences.getBoolean("disableTrending", true);
|
disableTrending = preferences.getBoolean("disableTrending", true);
|
||||||
dontSendGreetingSticker = preferences.getBoolean("dontSendGreetingSticker", false);
|
dontSendGreetingSticker = preferences.getBoolean("dontSendGreetingSticker", false);
|
||||||
|
hideTimeForSticker = preferences.getBoolean("hideTimeForSticker", false);
|
||||||
takeGIFasVideo = preferences.getBoolean("takeGIFasVideo", false);
|
takeGIFasVideo = preferences.getBoolean("takeGIFasVideo", false);
|
||||||
|
|
||||||
disableAutoDownloadingWin32Executable = preferences.getBoolean("disableAutoDownloadingWin32Executable", true);
|
disableAutoDownloadingWin32Executable = preferences.getBoolean("disableAutoDownloadingWin32Executable", true);
|
||||||
|
@ -805,6 +807,10 @@ public class NekoConfig {
|
||||||
preferences.edit().putBoolean("dontSendGreetingSticker", dontSendGreetingSticker = !dontSendGreetingSticker).apply();
|
preferences.edit().putBoolean("dontSendGreetingSticker", dontSendGreetingSticker = !dontSendGreetingSticker).apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void toggleHideTimeForSticker() {
|
||||||
|
preferences.edit().putBoolean("hideTimeForSticker", hideTimeForSticker = !hideTimeForSticker).apply();
|
||||||
|
}
|
||||||
|
|
||||||
public static void toggleTakeGIFasVideo() {
|
public static void toggleTakeGIFasVideo() {
|
||||||
preferences.edit().putBoolean("takeGIFasVideo", takeGIFasVideo = !takeGIFasVideo).apply();
|
preferences.edit().putBoolean("takeGIFasVideo", takeGIFasVideo = !takeGIFasVideo).apply();
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
||||||
private int disableProximityEventsRow;
|
private int disableProximityEventsRow;
|
||||||
private int disableTrendingRow;
|
private int disableTrendingRow;
|
||||||
private int dontSendGreetingStickerRow;
|
private int dontSendGreetingStickerRow;
|
||||||
|
private int hideTimeForStickerRow;
|
||||||
private int takeGIFasVideoRow;
|
private int takeGIFasVideoRow;
|
||||||
|
|
||||||
private int mapPreviewRow;
|
private int mapPreviewRow;
|
||||||
|
@ -276,6 +277,11 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
||||||
if (view instanceof TextCheckCell) {
|
if (view instanceof TextCheckCell) {
|
||||||
((TextCheckCell) view).setChecked(NekoConfig.dontSendGreetingSticker);
|
((TextCheckCell) view).setChecked(NekoConfig.dontSendGreetingSticker);
|
||||||
}
|
}
|
||||||
|
} else if (position == hideTimeForStickerRow) {
|
||||||
|
NekoConfig.toggleHideTimeForSticker();
|
||||||
|
if (view instanceof TextCheckCell) {
|
||||||
|
((TextCheckCell) view).setChecked(NekoConfig.hideTimeForSticker);
|
||||||
|
}
|
||||||
} else if (position == takeGIFasVideoRow) {
|
} else if (position == takeGIFasVideoRow) {
|
||||||
NekoConfig.toggleTakeGIFasVideo();
|
NekoConfig.toggleTakeGIFasVideo();
|
||||||
if (view instanceof TextCheckCell) {
|
if (view instanceof TextCheckCell) {
|
||||||
|
@ -329,6 +335,7 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
||||||
disableProximityEventsRow = rowCount++;
|
disableProximityEventsRow = rowCount++;
|
||||||
disableTrendingRow = rowCount++;
|
disableTrendingRow = rowCount++;
|
||||||
dontSendGreetingStickerRow = rowCount++;
|
dontSendGreetingStickerRow = rowCount++;
|
||||||
|
hideTimeForStickerRow = rowCount++;
|
||||||
takeGIFasVideoRow = rowCount++;
|
takeGIFasVideoRow = rowCount++;
|
||||||
|
|
||||||
mapPreviewRow = rowCount++;
|
mapPreviewRow = rowCount++;
|
||||||
|
@ -691,6 +698,8 @@ public class NekoChatSettingsActivity extends BaseFragment implements Notificati
|
||||||
textCell.setTextAndCheck(LocaleController.getString("DisableTrending", R.string.DisableTrending), NekoConfig.disableTrending, true);
|
textCell.setTextAndCheck(LocaleController.getString("DisableTrending", R.string.DisableTrending), NekoConfig.disableTrending, true);
|
||||||
} else if (position == dontSendGreetingStickerRow) {
|
} else if (position == dontSendGreetingStickerRow) {
|
||||||
textCell.setTextAndCheck(LocaleController.getString("DontSendGreetingSticker", R.string.DontSendGreetingSticker), NekoConfig.dontSendGreetingSticker, true);
|
textCell.setTextAndCheck(LocaleController.getString("DontSendGreetingSticker", R.string.DontSendGreetingSticker), NekoConfig.dontSendGreetingSticker, true);
|
||||||
|
} else if (position == hideTimeForStickerRow) {
|
||||||
|
textCell.setTextAndCheck(LocaleController.getString("HideTimeForSticker", R.string.HideTimeForSticker), NekoConfig.hideTimeForSticker, true);
|
||||||
} else if (position == takeGIFasVideoRow) {
|
} else if (position == takeGIFasVideoRow) {
|
||||||
textCell.setTextAndCheck(LocaleController.getString("TakeGIFasVideo", R.string.TakeGIFasVideo), NekoConfig.takeGIFasVideo, true);
|
textCell.setTextAndCheck(LocaleController.getString("TakeGIFasVideo", R.string.TakeGIFasVideo), NekoConfig.takeGIFasVideo, true);
|
||||||
} else if (position == win32Row) {
|
} else if (position == win32Row) {
|
||||||
|
|
|
@ -113,5 +113,6 @@
|
||||||
<string name="DontSendGreetingSticker">Don\'t send greeting sticker</string>
|
<string name="DontSendGreetingSticker">Don\'t send greeting sticker</string>
|
||||||
<string name="TakeGIFasVideo">Take GIF as Video</string>
|
<string name="TakeGIFasVideo">Take GIF as Video</string>
|
||||||
<string name="UseMediaStreamInVoip">Use media stream in Voip</string>
|
<string name="UseMediaStreamInVoip">Use media stream in Voip</string>
|
||||||
|
<string name="HideTimeForSticker">Hide time for stickers</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue