This commit is contained in:
lunaticbum
2024-11-08 17:00:47 +09:00
parent ecb6122e7f
commit f2311bd7f9
17 changed files with 105 additions and 72 deletions
@@ -1125,9 +1125,15 @@ fun openYouTube(schemeString : String) {
}
fun openReddit(schemeString : String) {
BLog.LOGE("schemeString >>>> ${schemeString}")
var uri = schemeString.toUri()
val gmmIntentUri = Uri.parse(schemeString)
val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
mapIntent.setPackage("com.reddit.frontpage")
if (uri != null && uri.host?.contains("facebook") == true) {
} else {
mapIntent.setPackage("com.reddit.frontpage")
}
lActivity?.startActivity(mapIntent)
}
@@ -303,11 +303,13 @@ internal class LauncherHome : Fragment() {
binding.currentMusic.visibility = View.VISIBLE
binding.nextPlay.visibility = View.GONE
binding.artist.text = it.artists
binding.artist.isSelected = true
binding.title.text = it.title
var bitmap: Bitmap? = null
binding.title.isSelected = true
try {
bitmap = BitmapConverter.StringToBitmap(it.albumArt)
binding.albumArt.setImageBitmap(bitmap)
BitmapConverter.StringToBitmap(it.albumArt)?.let {
binding.albumArt.setImageBitmap(it)
}
} catch (exception: java.lang.Exception) {
// log error
}
@@ -38,8 +38,10 @@ import bums.lunatic.launcher.openNews
import bums.lunatic.launcher.openOpera
import bums.lunatic.launcher.openReddit
import bums.lunatic.launcher.openYouTube
import bums.lunatic.launcher.utils.BLog
import bums.lunatic.launcher.workers.WorkersDb
import com.google.android.material.imageview.ShapeableImageView
import com.google.gson.Gson
import com.squareup.picasso.Picasso
import io.realm.kotlin.UpdatePolicy
import java.text.SimpleDateFormat
@@ -121,7 +123,9 @@ internal class RssItemAdapter (
} else {
holder.view.date.text = emptyDate
}
if(RssDataType.FMKORAE.equals(rssData.category())) {
BLog.LOGE("rssData >>>> ${Gson().toJson(rssData)}")
}
holder.view.title.text = "".plus(if(rssData.vote) " * " else "").plus(rssData.title().plus("[R:${rssData.read}]"))
holder.view.desc.text = rssData.description()
@@ -30,10 +30,10 @@ class WeatherHourlyAdapter(private val dataSet: ArrayList<Hour>): RecyclerView.A
.into(holder.viewItem.imgWeather)
}
// BLog.LOGE("reeeeeeeeeee >>> ${holder.viewItem.hour.text}")
holder.viewItem.amOrPm.visibility =
if (arrayListOf(12, 0).contains(WeatherInfoManager.toZonedDateTime(it.time_epoch).hour) || position == 0) {
View.VISIBLE
} else View.INVISIBLE
// holder.viewItem.amOrPm.visibility =
// if (arrayListOf(12, 0).contains(WeatherInfoManager.toZonedDateTime(it.time_epoch).hour) || position == 0) {
// View.VISIBLE
// } else View.INVISIBLE
holder.viewItem.hour.apply {
if (WeatherInfoManager.toZonedDateTime(it.time_epoch).hour == 0) {
this@apply.setTextColor(Color.BLACK)
@@ -19,6 +19,13 @@ object RssList {
)
val newsFeeds = arrayListOf(
"https://news.google.com/rss?hl=ko&gl=KR&ceid=KR:ko",
"https://imnews.imbc.com/rss/google_news/narrativeNews.rss",
"http://www.hani.co.kr/rss",
"http://biz.heraldcorp.com/common_prog/rssdisp.php?ct=010000000000.xml",
"https://rss.inews24.com/rss/news_inews.xml",
"https://rss.nocutnews.co.kr/category/it.xml",
"https://rss.nocutnews.co.kr/news/news.xml",
"https://rss.nocutnews.co.kr/news/top.xml",
)
val feedJsons = arrayListOf(
@@ -43,21 +50,14 @@ object RssList {
fun getFeedUrls() = keyWords.map { "https://news.google.com/rss/search?q=${URLEncoder.encode(it)}=ko&gl=KR&ceid=KR%3Ako/" }
val keyWords = listOf(
"영화",
"개발",
"신작",
"신보",
"IT",
"날씨",
"테크",
"래퍼",
"부동산",
"과학",
"당뇨",
"신장",
"여행",
"음반",
"도끼",
"힙합",
)
@@ -22,7 +22,7 @@ class FmKoreaGetter : BaseGetter {
RssDataType.FMKORAE.isOn {
val now = Date()
try {
val fmkoreaUrls = arrayListOf("https://www.fmkorea.com")
val fmkoreaUrls = arrayListOf("https://www.fmkorea.com/best","https://www.fmkorea.com/best2")
fmkoreaUrls.forEach {
Jsoup.connect(it).userAgent(USAGT).get().let { fmkorea ->
// BLog.LOGE("fmkorea >>> ${fmkorea.title()}")
@@ -50,7 +50,7 @@ class FmKoreaGetter : BaseGetter {
"역사"
) == true
) {
if (this.pubDate() > commicsDateTime) {
if (this.pubDate() > commicsDateTime && tumb.length > 10) {
temp.add(this.getRssData())
}
}