|
|
|
@ -4,6 +4,7 @@ import android.content.DialogInterface
|
|
|
|
|
import android.os.Bundle
|
|
|
|
|
import android.view.*
|
|
|
|
|
import android.widget.TextView
|
|
|
|
|
import android.widget.Toast
|
|
|
|
|
import androidx.appcompat.app.AlertDialog
|
|
|
|
|
import androidx.fragment.app.Fragment
|
|
|
|
|
import androidx.fragment.app.activityViewModels
|
|
|
|
@ -108,7 +109,11 @@ class ViewCollectionFragment : Fragment() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
|
|
|
val cachedCollection = collectionModel.value!!
|
|
|
|
|
val cachedCollection = collectionModel.value
|
|
|
|
|
if (cachedCollection == null) {
|
|
|
|
|
Toast.makeText(context, R.string.loading_error_title, Toast.LENGTH_LONG).show()
|
|
|
|
|
return super.onOptionsItemSelected(item)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
when (item.itemId) {
|
|
|
|
|
R.id.on_edit -> {
|
|
|
|
|