mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[UI] Add requesting storage permissions when generating timetable.
This commit is contained in:
parent
bf03601e83
commit
62fdfe754e
@ -107,12 +107,14 @@ class GenerateBlockTimetableDialog(
|
|||||||
.show()
|
.show()
|
||||||
|
|
||||||
dialog.getButton(AlertDialog.BUTTON_POSITIVE)?.onClick {
|
dialog.getButton(AlertDialog.BUTTON_POSITIVE)?.onClick {
|
||||||
|
app.permissionManager.requestStoragePermission(activity, permissionMessage = R.string.permissions_generate_timetable) {
|
||||||
when (b.weekSelectionRadioGroup.checkedRadioButtonId) {
|
when (b.weekSelectionRadioGroup.checkedRadioButtonId) {
|
||||||
R.id.withChangesCurrentWeekRadio -> generateBlockTimetable(weekCurrentStart, weekCurrentEnd)
|
R.id.withChangesCurrentWeekRadio -> generateBlockTimetable(weekCurrentStart, weekCurrentEnd)
|
||||||
R.id.withChangesNextWeekRadio -> generateBlockTimetable(weekNextStart, weekNextEnd)
|
R.id.withChangesNextWeekRadio -> generateBlockTimetable(weekNextStart, weekNextEnd)
|
||||||
R.id.forSelectedWeekRadio -> selectDate()
|
R.id.forSelectedWeekRadio -> selectDate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
private fun selectDate() {
|
private fun selectDate() {
|
||||||
|
@ -1399,4 +1399,5 @@
|
|||||||
<string name="profile_config_sync_enabled">Synchronizuj ten profil</string>
|
<string name="profile_config_sync_enabled">Synchronizuj ten profil</string>
|
||||||
<string name="profile_config_logout">Wyloguj się</string>
|
<string name="profile_config_logout">Wyloguj się</string>
|
||||||
<string name="permissions_qr_scanner">Aby móc zeskanować kod QR musisz przyznać uprawnienia dostępu do kamery.\n\nKliknij OK, aby przyznać uprawnienia.</string>
|
<string name="permissions_qr_scanner">Aby móc zeskanować kod QR musisz przyznać uprawnienia dostępu do kamery.\n\nKliknij OK, aby przyznać uprawnienia.</string>
|
||||||
|
<string name="permissions_generate_timetable">Aby móc zapisać wygenerowany plan lekcji musisz przyznać uprawnienia dostępu do pamięci urządzenia.\n\nKliknij OK, aby przyznać uprawnienia.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user