|
|
@ -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))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|