added guardian letters with chat and multiple answer functionalities
This commit is contained in:
@@ -31,6 +31,7 @@ Map<String, dynamic> _$ModulesSettingsToJson(
|
||||
|
||||
const _$ModulesEnumMap = {
|
||||
Modules.timetable: 'timetable',
|
||||
Modules.parentLetters: 'parentLetters',
|
||||
Modules.ticker: 'ticker',
|
||||
Modules.talk: 'talk',
|
||||
Modules.files: 'files',
|
||||
|
||||
@@ -16,9 +16,20 @@ class NotificationSettings {
|
||||
@JsonKey(defaultValue: false)
|
||||
bool talkPermissionPromptShown;
|
||||
|
||||
/// Same one-shot guards for the two occasions on which accounts with
|
||||
/// parent letters are asked: right after signing in and, if the permission
|
||||
/// is still missing, on the first visit of the parent letters.
|
||||
@JsonKey(defaultValue: false)
|
||||
bool guardianLoginPromptShown;
|
||||
|
||||
@JsonKey(defaultValue: false)
|
||||
bool parentLettersPromptShown;
|
||||
|
||||
NotificationSettings({
|
||||
this.enabled = true,
|
||||
this.talkPermissionPromptShown = false,
|
||||
this.guardianLoginPromptShown = false,
|
||||
this.parentLettersPromptShown = false,
|
||||
});
|
||||
|
||||
factory NotificationSettings.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -12,6 +12,8 @@ NotificationSettings _$NotificationSettingsFromJson(
|
||||
enabled: json['enabled'] as bool? ?? true,
|
||||
talkPermissionPromptShown:
|
||||
json['talkPermissionPromptShown'] as bool? ?? false,
|
||||
guardianLoginPromptShown: json['guardianLoginPromptShown'] as bool? ?? false,
|
||||
parentLettersPromptShown: json['parentLettersPromptShown'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$NotificationSettingsToJson(
|
||||
@@ -19,4 +21,6 @@ Map<String, dynamic> _$NotificationSettingsToJson(
|
||||
) => <String, dynamic>{
|
||||
'enabled': instance.enabled,
|
||||
'talkPermissionPromptShown': instance.talkPermissionPromptShown,
|
||||
'guardianLoginPromptShown': instance.guardianLoginPromptShown,
|
||||
'parentLettersPromptShown': instance.parentLettersPromptShown,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user