Add "Hide time under stickers"

This commit is contained in:
Ivan K
2022-03-15 16:12:31 +03:00
parent b0759263d8
commit cadb48e9e2
4 changed files with 13 additions and 1 deletions

View File

@@ -23,6 +23,8 @@ object ExteraConfig {
// Chats
// Stickers
var stickerSize by sharedPreferences.int("stickerSize", 100)
var hideStickerTime by sharedPreferences.boolean("hideStickerTime", false)
// General
var hideKeyboardOnScroll by sharedPreferences.boolean("hideKeyboardOnScroll", true)
var archiveOnPull by sharedPreferences.boolean("archiveOnPull", true)

View File

@@ -29,6 +29,15 @@ class ChatsPreferencesEntry : BasePreferencesEntry {
}
}
}
switch {
title = LocaleController.getString("StickerTime", R.string.StickerTime)
contract({
return@contract ExteraConfig.hideStickerTime
}) {
ExteraConfig.hideStickerTime = it
}
}
}
category(LocaleController.getString("General", R.string.General)) {
switch {

View File

@@ -11150,7 +11150,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
if ((!autoPlayingMedia || !MediaController.getInstance().isPlayingMessageAndReadyToDraw(currentMessageObject) || isRoundVideo) && !transitionParams.animateBackgroundBoundsInner) {
drawOverlays(canvas);
}
if ((drawTime || !mediaBackground) && !forceNotDrawTime && !transitionParams.animateBackgroundBoundsInner && !(enterTransitionInProgress && !currentMessageObject.isVoice())) {
if ((drawTime || !mediaBackground) && !forceNotDrawTime && !transitionParams.animateBackgroundBoundsInner && !(enterTransitionInProgress && !currentMessageObject.isVoice()) && (!currentMessageObject.isAnyKindOfSticker() || !ExteraConfig.INSTANCE.getHideStickerTime())) {
drawTime(canvas, 1f, false);
}

View File

@@ -32,6 +32,7 @@
<!-- Chats -->
<string name="StickerSize">Stickers size</string>
<string name="StickerTime">Hide time under stickers</string>
<string name="HideKeyboardOnScroll">Hide Keyboard on Scrolling</string>
<string name="ArchiveOnPull">Open Archive on Pulldown</string>