This commit is contained in:
lunaticbum 2024-09-04 18:35:20 +09:00
parent c198294e12
commit 3bd1635e6e

View File

@ -528,32 +528,32 @@ internal class LauncherActivity : AppCompatActivity() {
super.onPageFinished(view, url)
lastedFinishedPageUrl = url ?: ""
BLog.LOGE("binding.otherCheck searcher01 in onPageFinished ${url}")
if(lastedFinishedPageUrl?.length ?: 0 > 10 && url?.contains("data:text") == false) {
if (url?.contains("youtube", false) == true) {
view?.evaluateJavascript(
"function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
" };getAll()"
) { result ->
(result as? String)?.let {
if (url?.contains("youtube", false) == true) {
view?.evaluateJavascript(
"function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
" };getAll()"
) { result ->
(result as? String)?.let {
}
}
} else {
//if (url?.contains("guru", true) == true)
view?.evaluateJavascript(
"function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
" };getAll()"
) { result ->
(result as? String)?.let {
}
}
} else {
//if (url?.contains("guru", true) == true)
view?.evaluateJavascript(
"function getAll() {\n" +
" MyJavaScriptInterface.sendValueFromHtml(document.getElementsByTagName('html')[0].innerHTML)" +
" };getAll()"
) { result ->
(result as? String)?.let {
}
}
}
callBack?.invoke()
binding.searcher01.post { binding.searcher01.visibility = View.GONE }
}
callBack?.invoke()
binding.searcher01.post { binding.searcher01.visibility = View.GONE }
}
}
WebView.setWebContentsDebuggingEnabled(false)
@ -644,10 +644,10 @@ internal class LauncherActivity : AppCompatActivity() {
}.apply {
var itemC = 0
WorkersDb.insertBulkInteface(temp)
BLog.LOGE("Stored data :: ${listItem.size}items ${simpldateFormat.format(Date(minDate))} ~ ${simpldateFormat.format(Date(maxDate))} set in ${itemC}")
Toast.makeText(this@LauncherActivity,
"Stored data :: ${listItem.size} items :: [${simpldateFormat.format(Date(minDate))} ~ ${simpldateFormat.format(Date(maxDate))}] \n set in ${itemC}", Toast.LENGTH_LONG).show()
// }
// BLog.LOGE("Stored data :: ${listItem.size}items ${simpldateFormat.format(Date(minDate))} ~ ${simpldateFormat.format(Date(maxDate))} set in ${itemC}")
// Toast.makeText(this@LauncherActivity,
// "Stored data :: ${listItem.size} items :: [${simpldateFormat.format(Date(minDate))} ~ ${simpldateFormat.format(Date(maxDate))}] \n set in ${itemC}", Toast.LENGTH_LONG).show()
//// }
binding.searcher01?.post { binding.searcher01.loadData("<html></html>",null,null) }
this@LauncherActivity.callBack?.invoke()
}
@ -667,9 +667,10 @@ internal class LauncherActivity : AppCompatActivity() {
}
}
}.apply {
listTags.sortByDescending { it.pubDate() }
Toast.makeText(this@LauncherActivity,
"Stored data :: ${listTags.size}tags", Toast.LENGTH_SHORT).show()
// listTags.sortByDescending { it.pubDate() }
// Toast.makeText(this@LauncherActivity,
// "Stored data :: ${listTags.size}tags", Toast.LENGTH_SHORT).show()
binding.searcher01?.post { binding.searcher01.loadData("<html></html>",null,null) }
this@LauncherActivity.callBack?.invoke()
}
}