Skip to content

feat: Add App Message feature for displaying static backend message - #530

Open
ahmed-tarek-salem wants to merge 7 commits into
developfrom
feature/add-in-app-messages
Open

feat: Add App Message feature for displaying static backend message#530
ahmed-tarek-salem wants to merge 7 commits into
developfrom
feature/add-in-app-messages

Conversation

@ahmed-tarek-salem

Copy link
Copy Markdown
Contributor

This PR implements the App Message feature, which fetches and displays a static blocking or non-blocking message provided by the endpoint.

The feature is still under development.

Comment thread lib/pages/main/maintenance_screen.dart Outdated
@sallymoc

Copy link
Copy Markdown
Contributor

@ahmed-tarek-salem can you please add in the readme the information how this works

@ahmed-tarek-salem

Copy link
Copy Markdown
Contributor Author

@sallymoc

Sure, the README file has been updated.

startDate: _parseDate(json['start_date']),
endDate: _parseDate(json['end_date']),
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmed-tarek-salem how localised message would be handled?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmed-tarek-salem

  • can we also add the possibility to define the message for specific os version?
    i.e android_os_version: <13
    "Since beginning of next year, our app will only run on devices with Android 13 or upper."
  • can we also add a disabled true/false field to just disable easily a message. Default value would be false, meaning if not present, is assumed is enabled.

Comment thread lib/dtos/app_message_dto.dart Outdated
message: json['message'] ?? '',
blocking: json['blocking'] ?? false,
platform: json['platform'] ?? 'all',
startDate: _parseDate(json['start_date']),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmed-tarek-salem can we use startDate and endDate instead?
I think we should prefer this format as it could be mapped automatically to object properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants