This commit is contained in:
lunaticbum 2024-09-13 14:30:06 +09:00
parent c8bd83689e
commit 8121813434

View File

@ -77,6 +77,10 @@ import rasel.lunar.launcher.helpers.UniUtils.Companion.biometricPromptInfo
import rasel.lunar.launcher.helpers.UniUtils.Companion.canAuthenticate import rasel.lunar.launcher.helpers.UniUtils.Companion.canAuthenticate
import rasel.lunar.launcher.helpers.UniUtils.Companion.expandNotificationPanel import rasel.lunar.launcher.helpers.UniUtils.Companion.expandNotificationPanel
import rasel.lunar.launcher.helpers.UniUtils.Companion.lockMethod import rasel.lunar.launcher.helpers.UniUtils.Companion.lockMethod
import rasel.lunar.launcher.home.adapters.NotificationItemAdapter
import rasel.lunar.launcher.home.adapters.RecentCallsAdapter
import rasel.lunar.launcher.home.adapters.RssItemAdapter
import rasel.lunar.launcher.home.adapters.SmsLogsAdapter
import rasel.lunar.launcher.model.CurrentPlayItem import rasel.lunar.launcher.model.CurrentPlayItem
import rasel.lunar.launcher.model.NotificationItem import rasel.lunar.launcher.model.NotificationItem
import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.RssData
@ -84,10 +88,6 @@ import rasel.lunar.launcher.model.RssDataInterface
import rasel.lunar.launcher.model.RssDataType import rasel.lunar.launcher.model.RssDataType
import rasel.lunar.launcher.qaccess.QuickAccess import rasel.lunar.launcher.qaccess.QuickAccess
import rasel.lunar.launcher.settings.SettingsActivity import rasel.lunar.launcher.settings.SettingsActivity
import rasel.lunar.launcher.home.adapters.RecentCallsAdapter
import rasel.lunar.launcher.home.adapters.NotificationItemAdapter
import rasel.lunar.launcher.home.adapters.RssItemAdapter
import rasel.lunar.launcher.home.adapters.SmsLogsAdapter
import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.BLog
import rasel.lunar.launcher.utils.BitmapConverter import rasel.lunar.launcher.utils.BitmapConverter
import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.JamoUtils
@ -392,30 +392,27 @@ internal class LauncherHome : Fragment() {
}} }}
BLog.LOGE("${this} ::::: queryInfos after delete >>>> ") BLog.LOGE("${this} ::::: queryInfos after delete >>>> ")
var rQ = WorkersDb.getRealm().query<RssData>().query("pubDate > $0", beforeDay(Date(),3)) var rQ = WorkersDb.getRealm().query<RssData>().query("pubDate > $0", beforeDay(Date(),3))
if(keyword.length > 0) if(keyword.length > 0) {
keyword.split("").forEach { BLog.LOGE("queryInfos it >>> ${keyword}")
BLog.LOGE("queryInfos it >>> ${it}") if (JamoUtils.CHOSUNG.contains(keyword.split("")[0])) {
if (it.length > 0) {
if (JamoUtils.CHOSUNG.contains(it)) {
rQ = rQ.query( rQ = rQ.query(
"title CONTAINS $0 OR chosung CONTAINS $1 ", "title CONTAINS $0 OR chosung CONTAINS $1 ",
it, keyword,
it keyword
) )
} else if(Pattern.matches("^[가-힣]*\$", it)){ } else if(Pattern.matches("^[가-힣]*\$", keyword)){
rQ = rQ.query( rQ = rQ.query(
"title CONTAINS $0", "title CONTAINS $0",
it keyword
) )
}else { }else {
rQ = rQ.query( rQ = rQ.query(
"title CONTAINS $0 OR title CONTAINS $1", "title CONTAINS $0 OR title CONTAINS $1",
it.toUpperCase(), keyword.toUpperCase(),
it.toLowerCase() keyword.toLowerCase()
) )
} }
} }
}
category?.let { category?.let {
rQ = rQ.query("category == $0", it) rQ = rQ.query("category == $0", it)