mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-31 02:11:02 +00:00
clean Sad's shit
This commit is contained in:
@@ -7,10 +7,10 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.fragment.app.Fragment
|
||||
import ani.dantotsu.databinding.FragmentOfflineBinding
|
||||
import ani.dantotsu.isOnline
|
||||
import ani.dantotsu.App
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.databinding.FragmentOfflineBinding
|
||||
import ani.dantotsu.isOnline
|
||||
import ani.dantotsu.navBarHeight
|
||||
import ani.dantotsu.startMainActivity
|
||||
import ani.dantotsu.statusBarHeight
|
||||
@@ -26,8 +26,10 @@ class OfflineFragment : Fragment() {
|
||||
topMargin = statusBarHeight
|
||||
bottomMargin = navBarHeight
|
||||
}
|
||||
val offline = App.context?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)?.getBoolean("offlineMode", false) ?: false
|
||||
binding.noInternet.text = if (!isOnline(requireContext())) getString(R.string.no_internet) else "OFFLINE MODE"
|
||||
val offline = App.context?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
|
||||
?.getBoolean("offlineMode", false) ?: false
|
||||
binding.noInternet.text =
|
||||
if (!isOnline(requireContext())) getString(R.string.no_internet) else "OFFLINE MODE"
|
||||
binding.refreshButton.setOnClickListener {
|
||||
if (!isOnline(requireContext()) && offline) {
|
||||
startMainActivity(requireActivity())
|
||||
|
||||
Reference in New Issue
Block a user