mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[UI] Add requesting storage permissions when generating timetable.
This commit is contained in:
parent
bf03601e83
commit
62fdfe754e
@ -107,10 +107,12 @@ class GenerateBlockTimetableDialog(
|
||||
.show()
|
||||
|
||||
dialog.getButton(AlertDialog.BUTTON_POSITIVE)?.onClick {
|
||||
when (b.weekSelectionRadioGroup.checkedRadioButtonId) {
|
||||
R.id.withChangesCurrentWeekRadio -> generateBlockTimetable(weekCurrentStart, weekCurrentEnd)
|
||||
R.id.withChangesNextWeekRadio -> generateBlockTimetable(weekNextStart, weekNextEnd)
|
||||
R.id.forSelectedWeekRadio -> selectDate()
|
||||
app.permissionManager.requestStoragePermission(activity, permissionMessage = R.string.permissions_generate_timetable) {
|
||||
when (b.weekSelectionRadioGroup.checkedRadioButtonId) {
|
||||
R.id.withChangesCurrentWeekRadio -> generateBlockTimetable(weekCurrentStart, weekCurrentEnd)
|
||||
R.id.withChangesNextWeekRadio -> generateBlockTimetable(weekNextStart, weekNextEnd)
|
||||
R.id.forSelectedWeekRadio -> selectDate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
@ -1399,4 +1399,5 @@
|
||||
<string name="profile_config_sync_enabled">Synchronizuj ten profil</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_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>
|
||||
|
Loading…
Reference in New Issue
Block a user