This commit is contained in:
lunaticbum 2024-12-03 16:48:48 +09:00
parent ab2d0af594
commit 3784f973ca
2 changed files with 8 additions and 5 deletions

View File

@ -147,7 +147,7 @@ internal class LauncherHome : Fragment() {
}
val nomoreShowCount = 5
fun rssStateVote() = lasted?.filter { it.vote == false }?.size ?: 0 == 0
fun rssStateVote() = (lasted?.filter { it.vote == true }?.size ?: -1) == (lasted?.size ?: 0)
var lasted: List<RssData>? = null
var lastedNoti: List<NotificationItem>? = null

View File

@ -159,8 +159,8 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
WorkersDb.getRealm().apply {
writeBlocking {
val result = query<RssData>().query("originPage == $0", rssId).find()
if(result.size == 1) {
result.first().vote = true
if(result.size > 0) {
result.forEach { it.vote = true }
}
}
}
@ -175,6 +175,9 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
rssId = rssList.get(currentIdx)
Blog.LOGE("Arrow Left Click ${currentIdx} ${rssId}")
load(rssId)
} else {
Toast.makeText(this, "없어 끄자", Toast.LENGTH_LONG).show()
finish()
}
registCancelSearch()
}
@ -185,8 +188,8 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
val result =
query<RssData>().query("originPage == $0", rssId)
.find()
if (result.size == 1) {
result.first().read += 5
if (result.size > 0) {
result.forEach { it.read += 5 }
}
}
}