parent
c632c9920c
commit
95208c84a9
|
@ -11,7 +11,6 @@ import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.navigation.Navigation
|
|
||||||
import kotlinx.android.synthetic.main.fragment_exceptions.view.*
|
import kotlinx.android.synthetic.main.fragment_exceptions.view.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
|
@ -65,9 +64,7 @@ class ExceptionsFragment : Fragment() {
|
||||||
viewLifecycleOwner.lifecycleScope.launch(IO) {
|
viewLifecycleOwner.lifecycleScope.launch(IO) {
|
||||||
val domains = ExceptionDomains.load(context!!)
|
val domains = ExceptionDomains.load(context!!)
|
||||||
ExceptionDomains.remove(context!!, domains)
|
ExceptionDomains.remove(context!!, domains)
|
||||||
launch(Main) {
|
reloadData()
|
||||||
view?.let { view -> Navigation.findNavController(view).navigateUp() }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,10 +98,6 @@ class ExceptionsFragment : Fragment() {
|
||||||
|
|
||||||
coroutineScope {
|
coroutineScope {
|
||||||
launch(Main) {
|
launch(Main) {
|
||||||
if (items.isEmpty()) {
|
|
||||||
view?.let { view: View -> Navigation.findNavController(view).navigateUp() }
|
|
||||||
return@launch
|
|
||||||
}
|
|
||||||
exceptionsStore.dispatch(ExceptionsAction.Change(items))
|
exceptionsStore.dispatch(ExceptionsAction.Change(items))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
android:title="@string/preferences_category_privacy"
|
android:title="@string/preferences_category_privacy"
|
||||||
app:iconSpaceReserved="false">
|
app:iconSpaceReserved="false">
|
||||||
<androidx.preference.Preference
|
<androidx.preference.Preference
|
||||||
android:icon="@drawable/ic_tracking_protection"
|
android:icon="@drawable/ic_tracking_protection_enabled"
|
||||||
android:key="@string/pref_key_tracking_protection_settings"
|
android:key="@string/pref_key_tracking_protection_settings"
|
||||||
android:title="@string/preferences_tracking_protection" />
|
android:title="@string/preferences_tracking_protection" />
|
||||||
<androidx.preference.Preference
|
<androidx.preference.Preference
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:icon="@drawable/ic_tracking_protection"
|
android:icon="@drawable/ic_tracking_protection_enabled"
|
||||||
android:key="@string/pref_key_tracking_protection"
|
android:key="@string/pref_key_tracking_protection"
|
||||||
android:summary="@string/preferences_tracking_protection_description"
|
android:summary="@string/preferences_tracking_protection_description"
|
||||||
android:title="@string/preferences_tracking_protection" />
|
android:title="@string/preferences_tracking_protection" />
|
||||||
|
|
Loading…
Reference in New Issue