fix: comment bar not visible (solution is so cursed)
This commit is contained in:
parent
cf93f6d657
commit
34a9a55d4f
13 changed files with 363 additions and 294 deletions
|
@ -490,6 +490,7 @@ fun ImageView.loadImage(url: String?, size: Int = 0) {
|
|||
}
|
||||
|
||||
fun ImageView.loadImage(file: FileUrl?, size: Int = 0) {
|
||||
file?.url = PrefManager.getVal<String>(PrefName.ImageUrl).ifEmpty { file?.url ?: "" }
|
||||
if (file?.url?.isNotEmpty() == true) {
|
||||
tryWith {
|
||||
val glideUrl = GlideUrl(file.url) { file.headers }
|
||||
|
@ -1124,12 +1125,14 @@ fun blurImage(imageView: ImageView, banner: String?){
|
|||
val sampling = PrefManager.getVal<Float>(PrefName.BlurSampling).toInt()
|
||||
if (PrefManager.getVal(PrefName.BlurBanners)){
|
||||
val context = imageView.context
|
||||
if (!(context as Activity).isDestroyed)
|
||||
if (!(context as Activity).isDestroyed) {
|
||||
val url = PrefManager.getVal<String>(PrefName.ImageUrl).ifEmpty { banner }
|
||||
Glide.with(context as Context)
|
||||
.load(GlideUrl(banner))
|
||||
.load(GlideUrl(url))
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL).override(400)
|
||||
.apply(RequestOptions.bitmapTransform(BlurTransformation(radius, sampling)))
|
||||
.into(imageView)
|
||||
}
|
||||
}else{
|
||||
imageView.loadImage(banner)
|
||||
}
|
||||
|
@ -1138,13 +1141,6 @@ fun blurImage(imageView: ImageView, banner: String?){
|
|||
}
|
||||
}
|
||||
|
||||
fun logToFile(context: Context, message: String) {
|
||||
val externalFilesDir = context.getExternalFilesDir(null)
|
||||
val file = File(externalFilesDir, "notifications.log")
|
||||
file.appendText(message)
|
||||
file.appendText("\n")
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the markwon instance with all the plugins
|
||||
* @return the markwon instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue