Glimpse: Move no permissions message to resources
Also sync it with Aperture. Change-Id: Id0e2cf1e1183079f93f733c5c2710781872bf905
This commit is contained in:
parent
395b012086
commit
a99d51f75c
|
@ -60,7 +60,7 @@ class AlbumFragment : Fragment(R.layout.fragment_album), LoaderManager.LoaderCal
|
||||||
if (it.isNotEmpty()) {
|
if (it.isNotEmpty()) {
|
||||||
if (!permissionsUtils.mainPermissionsGranted()) {
|
if (!permissionsUtils.mainPermissionsGranted()) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
requireContext(), "No main permissions", Toast.LENGTH_SHORT
|
requireContext(), R.string.app_permissions_toast, Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -75,7 +75,7 @@ class MediaViewerFragment : Fragment(
|
||||||
if (it.isNotEmpty()) {
|
if (it.isNotEmpty()) {
|
||||||
if (!permissionsUtils.mainPermissionsGranted()) {
|
if (!permissionsUtils.mainPermissionsGranted()) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
requireContext(), "No main permissions", Toast.LENGTH_SHORT
|
requireContext(), R.string.app_permissions_toast, Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ReelsFragment : Fragment(R.layout.fragment_reels), LoaderManager.LoaderCal
|
||||||
if (it.isNotEmpty()) {
|
if (it.isNotEmpty()) {
|
||||||
if (!permissionsUtils.mainPermissionsGranted()) {
|
if (!permissionsUtils.mainPermissionsGranted()) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
requireContext(), "No main permissions", Toast.LENGTH_SHORT
|
requireContext(), R.string.app_permissions_toast, Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<string name="app_name">Gallery</string>
|
<string name="app_name">Gallery</string>
|
||||||
|
|
||||||
|
<!-- Toast messages -->
|
||||||
|
<string name="app_permissions_toast">Permissions not granted by the user.</string>
|
||||||
|
|
||||||
<!-- Top app bar -->
|
<!-- Top app bar -->
|
||||||
<string name="top_app_bar_edit">Edit</string>
|
<string name="top_app_bar_edit">Edit</string>
|
||||||
<string name="top_app_bar_more">More</string>
|
<string name="top_app_bar_more">More</string>
|
||||||
|
|
Loading…
Reference in New Issue