dress by the hour

This commit is contained in:
JUNGGWAN KIM 2024-10-02 17:59:56 +09:00
parent 002c9a9e2d
commit 6f3ac6d086
2 changed files with 17 additions and 8 deletions

View File

@ -92,6 +92,7 @@ import rasel.lunar.launcher.home.adapters.RssItemAdapter
import rasel.lunar.launcher.home.adapters.SmsLogsAdapter import rasel.lunar.launcher.home.adapters.SmsLogsAdapter
import rasel.lunar.launcher.home.adapters.WeatherAdapter import rasel.lunar.launcher.home.adapters.WeatherAdapter
import rasel.lunar.launcher.model.CurrentPlayItem import rasel.lunar.launcher.model.CurrentPlayItem
import rasel.lunar.launcher.model.Hour
import rasel.lunar.launcher.model.NotificationItem import rasel.lunar.launcher.model.NotificationItem
import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.RssData
import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RssDataInterface
@ -304,14 +305,22 @@ internal class LauncherHome : Fragment() {
Handler(Looper.getMainLooper()).post { Handler(Looper.getMainLooper()).post {
mWeatherAdapter?.let{ mWeatherAdapter?.let{
it.update( it.update(
it.filter( mutableListOf<Hour>().apply {
li.first() li.forEach { i ->
.hourRealm if (i == li.first()) {
.also { hli -> this.addAll(it
BLog.LOGE("LauncherHome Saved hli >>> ${hli.size}") .filter(
i.hourRealm.also { hli ->
BLog.LOGE("LauncherHome Saved hli size >>> ${hli.size}")
}
).also { fli ->
BLog.LOGE("LauncherHome Saved fli size >>> ${fli.size}")
}
)
} else {
this.addAll(i.hourRealm)
} }
).also { fli -> }
BLog.LOGE("LauncherHome Saved fli >>> ${fli.size}")
} }
) )
it.notifyDataSetChanged() it.notifyDataSetChanged()

View File

@ -28,7 +28,7 @@ class OpenWeatherGetter(context: Context, workerParams: WorkerParameters) : Base
val VER_WEATHERAPI = "v1" val VER_WEATHERAPI = "v1"
val URI_WEATHERAPI = "https://api.weatherapi.com" val URI_WEATHERAPI = "https://api.weatherapi.com"
val KEY_WEATHERAPI = "8133d83d23ab4175a4160624241909" val KEY_WEATHERAPI = "8133d83d23ab4175a4160624241909"
val DAYS = 1 val DAYS = 2
////////////////////////////////////////// //////////////////////////////////////////
var lon: Double? = null // 경도 var lon: Double? = null // 경도
var lat: Double? = null // 위도 var lat: Double? = null // 위도