commit 2f4817d54c579c88872abe6525e5c51232b1c478
parent bd9ef394867e549f25be61d4b3ca5dd626a42265
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Thu, 22 Aug 2024 10:17:47 +0200
fix(core/ui): opera viewer icons
- fix skip when already seen
- make the eye bigger
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/OperaViewerIcons.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/OperaViewerIcons.kt
@@ -103,8 +103,8 @@ class OperaViewerIcons : AbstractMenu() {
override fun onViewDetachedFromWindow(v: View) {}
})
layoutParams = FrameLayout.LayoutParams(
- actionMenuIconSize,
- actionMenuIconSize
+ (actionMenuIconSize * 1.4).toInt(),
+ (actionMenuIconSize * 1.4).toInt()
).apply {
setMargins(0, 0, 0, actionMenuIconMarginTop * 2 + (80 * context.resources.displayMetrics.density).toInt())
marginEnd = actionMenuIconMarginTop * 2
@@ -116,8 +116,8 @@ class OperaViewerIcons : AbstractMenu() {
coroutineScope.launch {
val (conversationId, clientMessageId) = getMessageId() ?: return@launch
val result = feature(AutoMarkAsRead::class).markSnapAsSeen(conversationId, clientMessageId.toLong())
- if (result == "DUPLICATEREQUEST") return@launch
- if (result == null) {
+
+ if (result == "DUPLICATEREQUEST" || result == null) {
if (config.messaging.skipWhenMarkingAsSeen.get()) {
withContext(Dispatchers.Main) {
parent.iterateParent {
@@ -126,6 +126,10 @@ class OperaViewerIcons : AbstractMenu() {
}
}
}
+ }
+
+ if (result == "DUPLICATEREQUEST") return@launch
+ if (result == null) {
inAppOverlay.showStatusToast(
Icons.Default.Info,
translation["mark_as_seen.seen_toast"],