mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-31 05:50:18 +02:00
fix(core/ui): opera viewer icons
- fix skip when already seen - make the eye bigger
This commit is contained in:
parent
bd9ef39486
commit
2f4817d54c
@ -103,8 +103,8 @@ class OperaViewerIcons : AbstractMenu() {
|
|||||||
override fun onViewDetachedFromWindow(v: View) {}
|
override fun onViewDetachedFromWindow(v: View) {}
|
||||||
})
|
})
|
||||||
layoutParams = FrameLayout.LayoutParams(
|
layoutParams = FrameLayout.LayoutParams(
|
||||||
actionMenuIconSize,
|
(actionMenuIconSize * 1.4).toInt(),
|
||||||
actionMenuIconSize
|
(actionMenuIconSize * 1.4).toInt()
|
||||||
).apply {
|
).apply {
|
||||||
setMargins(0, 0, 0, actionMenuIconMarginTop * 2 + (80 * context.resources.displayMetrics.density).toInt())
|
setMargins(0, 0, 0, actionMenuIconMarginTop * 2 + (80 * context.resources.displayMetrics.density).toInt())
|
||||||
marginEnd = actionMenuIconMarginTop * 2
|
marginEnd = actionMenuIconMarginTop * 2
|
||||||
@ -116,8 +116,8 @@ class OperaViewerIcons : AbstractMenu() {
|
|||||||
coroutineScope.launch {
|
coroutineScope.launch {
|
||||||
val (conversationId, clientMessageId) = getMessageId() ?: return@launch
|
val (conversationId, clientMessageId) = getMessageId() ?: return@launch
|
||||||
val result = feature(AutoMarkAsRead::class).markSnapAsSeen(conversationId, clientMessageId.toLong())
|
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()) {
|
if (config.messaging.skipWhenMarkingAsSeen.get()) {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
parent.iterateParent {
|
parent.iterateParent {
|
||||||
@ -126,6 +126,10 @@ class OperaViewerIcons : AbstractMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == "DUPLICATEREQUEST") return@launch
|
||||||
|
if (result == null) {
|
||||||
inAppOverlay.showStatusToast(
|
inAppOverlay.showStatusToast(
|
||||||
Icons.Default.Info,
|
Icons.Default.Info,
|
||||||
translation["mark_as_seen.seen_toast"],
|
translation["mark_as_seen.seen_toast"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user