fix: show subscription name
This commit is contained in:
parent
1dd3bddeb9
commit
2c3eb82e4b
4 changed files with 7 additions and 12 deletions
|
@ -238,6 +238,9 @@ class SubscriptionNotificationTask : Task {
|
||||||
if (newStore.size >= 100) {
|
if (newStore.size >= 100) {
|
||||||
newStore.remove(newStore.minByOrNull { it.time })
|
newStore.remove(newStore.minByOrNull { it.time })
|
||||||
}
|
}
|
||||||
|
if (newStore.any { it.title == notification.title && it.content == notification.content}) {
|
||||||
|
return
|
||||||
|
}
|
||||||
newStore.add(notification)
|
newStore.add(notification)
|
||||||
PrefManager.setVal(PrefName.SubscriptionNotificationStore, newStore)
|
PrefManager.setVal(PrefName.SubscriptionNotificationStore, newStore)
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,11 +161,7 @@ class ExtensionTestItem(
|
||||||
serverResult()
|
serverResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
withContext(Dispatchers.Main) {
|
done()
|
||||||
if (::binding.isInitialized )
|
|
||||||
binding.extensionLoading.isVisible = false
|
|
||||||
isRunning = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun runNovelTest(extension: NovelParser) {
|
private suspend fun runNovelTest(extension: NovelParser) {
|
||||||
|
@ -192,11 +188,7 @@ class ExtensionTestItem(
|
||||||
serverResult()
|
serverResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
withContext(Dispatchers.Main) {
|
done()
|
||||||
if (::binding.isInitialized )
|
|
||||||
binding.extensionLoading.isVisible = false
|
|
||||||
isRunning = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun done() {
|
private fun done() {
|
||||||
|
|
|
@ -233,7 +233,7 @@ class NotificationActivity : AppCompatActivity() {
|
||||||
commentId = it.mediaId,
|
commentId = it.mediaId,
|
||||||
mediaId = it.mediaId,
|
mediaId = it.mediaId,
|
||||||
notificationType = it.type,
|
notificationType = it.type,
|
||||||
context = it.content,
|
context = it.title + ": " + it.content,
|
||||||
createdAt = (it.time / 1000L).toInt(),
|
createdAt = (it.time / 1000L).toInt(),
|
||||||
)
|
)
|
||||||
newNotifications += notification
|
newNotifications += notification
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:maxLines="3"
|
android:maxLines="4"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
android:transitionName="mediaTitle"
|
android:transitionName="mediaTitle"
|
||||||
tools:ignore="SpUsage"
|
tools:ignore="SpUsage"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue