mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-29 05:41:05 +00:00
feat : qol things
This commit is contained in:
@@ -84,6 +84,7 @@ import androidx.core.view.updateLayoutParams
|
||||
import androidx.core.view.updatePadding
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@@ -96,6 +97,7 @@ import ani.dantotsu.connections.crashlytics.CrashlyticsInterface
|
||||
import ani.dantotsu.databinding.ItemCountDownBinding
|
||||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.notifications.IncognitoNotificationClickReceiver
|
||||
import ani.dantotsu.others.ImageViewDialog
|
||||
import ani.dantotsu.others.SpoilerPlugin
|
||||
import ani.dantotsu.parsers.ShowResponse
|
||||
import ani.dantotsu.settings.saving.PrefManager
|
||||
@@ -1392,6 +1394,13 @@ fun Context.getThemeColor(@AttrRes attribute: Int): Int {
|
||||
theme.resolveAttribute(attribute, typedValue, true)
|
||||
return typedValue.data
|
||||
}
|
||||
fun ImageView.openImage(title: String, image: String) {
|
||||
setOnLongClickListener{
|
||||
ImageViewDialog.newInstance(
|
||||
context as FragmentActivity, title, image
|
||||
)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Builds the markwon instance with all the plugins
|
||||
* @return the markwon instance
|
||||
|
||||
Reference in New Issue
Block a user