backend preference wrapper
This commit is contained in:
parent
eb5b83564f
commit
8020b32541
66 changed files with 482 additions and 458 deletions
|
@ -11,6 +11,8 @@ import android.widget.LinearLayout
|
|||
import android.widget.TextView
|
||||
import androidx.cardview.widget.CardView
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.settings.saving.PrefName
|
||||
import ani.dantotsu.settings.saving.PrefWrapper
|
||||
|
||||
|
||||
class OfflineMangaAdapter(
|
||||
|
@ -21,8 +23,7 @@ class OfflineMangaAdapter(
|
|||
private val inflater: LayoutInflater =
|
||||
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
private var originalItems: List<OfflineMangaModel> = items
|
||||
private var style =
|
||||
context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getInt("offline_view", 0)
|
||||
private var style = PrefWrapper.getVal(PrefName.OfflineView, 0)
|
||||
|
||||
override fun getCount(): Int {
|
||||
return items.size
|
||||
|
@ -104,8 +105,7 @@ class OfflineMangaAdapter(
|
|||
}
|
||||
|
||||
fun notifyNewGrid() {
|
||||
style =
|
||||
context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getInt("offline_view", 0)
|
||||
style = PrefWrapper.getVal(PrefName.OfflineView, 0)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue