diff --git a/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreSetFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreSetFragment.kt index b04a56e6..9cefe48a 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreSetFragment.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/restore/RestoreSetFragment.kt @@ -22,19 +22,19 @@ class RestoreSetFragment : Fragment() { private lateinit var listView: RecyclerView private lateinit var progressBar: ProgressBar private lateinit var errorView: TextView - private lateinit var backView: TextView + private lateinit var skipView: TextView override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? - ): View? { + ): View { val v: View = inflater.inflate(R.layout.fragment_restore_set, container, false) listView = v.findViewById(R.id.listView) progressBar = v.findViewById(R.id.progressBar) errorView = v.findViewById(R.id.errorView) - backView = v.findViewById(R.id.backView) + skipView = v.findViewById(R.id.skipView) return v } @@ -49,7 +49,9 @@ class RestoreSetFragment : Fragment() { onRestoreResultsLoaded(result) }) - backView.setOnClickListener { requireActivity().finishAfterTransition() } + skipView.setOnClickListener { + viewModel.onFinishClickedAfterRestoringAppData() + } } override fun onStart() { diff --git a/app/src/main/res/layout/fragment_restore_set.xml b/app/src/main/res/layout/fragment_restore_set.xml index 9d3f85bd..6143e650 100644 --- a/app/src/main/res/layout/fragment_restore_set.xml +++ b/app/src/main/res/layout/fragment_restore_set.xml @@ -36,7 +36,7 @@ android:layout_marginTop="16dp" android:layout_marginEnd="16dp" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" - app:layout_constraintBottom_toTopOf="@+id/backView" + app:layout_constraintBottom_toTopOf="@+id/skipView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/titleView" @@ -47,7 +47,7 @@ style="?android:progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@+id/backView" + app:layout_constraintBottom_toTopOf="@+id/skipView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/titleView" /> @@ -60,7 +60,7 @@ android:textColor="?android:colorError" android:textSize="18sp" android:visibility="invisible" - app:layout_constraintBottom_toTopOf="@+id/backView" + app:layout_constraintBottom_toTopOf="@+id/skipView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/titleView" @@ -68,11 +68,11 @@ tools:visibility="visible" /> Choose a backup to restore Last backup %1$s ยท First %2$s. Don\'t restore + Skip restoring apps No backups found We could not find any backups at this location.\n\nPlease choose another location that contains a %s folder. An error occurred while loading the backups.