...
This commit is contained in:
parent
ab2d0af594
commit
3784f973ca
@ -147,7 +147,7 @@ internal class LauncherHome : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val nomoreShowCount = 5
|
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 lasted: List<RssData>? = null
|
||||||
var lastedNoti: List<NotificationItem>? = null
|
var lastedNoti: List<NotificationItem>? = null
|
||||||
|
|||||||
@ -159,8 +159,8 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
|||||||
WorkersDb.getRealm().apply {
|
WorkersDb.getRealm().apply {
|
||||||
writeBlocking {
|
writeBlocking {
|
||||||
val result = query<RssData>().query("originPage == $0", rssId).find()
|
val result = query<RssData>().query("originPage == $0", rssId).find()
|
||||||
if(result.size == 1) {
|
if(result.size > 0) {
|
||||||
result.first().vote = true
|
result.forEach { it.vote = true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,6 +175,9 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
|||||||
rssId = rssList.get(currentIdx)
|
rssId = rssList.get(currentIdx)
|
||||||
Blog.LOGE("Arrow Left Click ${currentIdx} ${rssId}")
|
Blog.LOGE("Arrow Left Click ${currentIdx} ${rssId}")
|
||||||
load(rssId)
|
load(rssId)
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "없어 끄자", Toast.LENGTH_LONG).show()
|
||||||
|
finish()
|
||||||
}
|
}
|
||||||
registCancelSearch()
|
registCancelSearch()
|
||||||
}
|
}
|
||||||
@ -185,8 +188,8 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
|||||||
val result =
|
val result =
|
||||||
query<RssData>().query("originPage == $0", rssId)
|
query<RssData>().query("originPage == $0", rssId)
|
||||||
.find()
|
.find()
|
||||||
if (result.size == 1) {
|
if (result.size > 0) {
|
||||||
result.first().read += 5
|
result.forEach { it.read += 5 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user