Skip to content

Commit

Permalink
Merge pull request #4831 from rokwire/issue/4830-storage-data-source-…
Browse files Browse the repository at this point in the history
…in-flexui

Fixed storage update support in FlexUi, acknowledged for conversations visibility updates in Debug Home panel [#4830]
  • Loading branch information
mihail-varbanov authored Feb 28, 2025
2 parents 6152d3f + 171ce74 commit 96c8c53
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## [6.1.X]
<!-- The following updates persist in the 6.1 support branch. -->
<!-- They should eihter appear in the next 6.1 support update, or in the upcoming 6.2 build. -->
### Changed
- Updated status text for no favorite locations [#4828](https://github.com/rokwire/illinois-app/issues/4828).
### Fixed
- Fixed storage update support in FlexUi, acknowledged for conversations visibility updates in Debug Home panel [#4830](https://github.com/rokwire/illinois-app/issues/4830).

## [6.1.65] - 2025-02-27
### Fixed
Expand Down
12 changes: 6 additions & 6 deletions lib/service/FlexUI.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ class FlexUI extends rokwire.FlexUI {
// Local Build

@override
bool localeIsEntryAvailable(String entry, { String? group, required Map<String, dynamic> rules }) {
bool localeIsEntryAvailable(String entry, { String? group, required Map<String, dynamic> rules, rokwire.FlexUiBuildContext? buildContext }) {

String? pathEntry = (group != null) ? '$group.$entry' : null;

Map<String, dynamic>? illiniCashRules = rules['illini_cash'];
dynamic illiniCashRule = (illiniCashRules != null) ? (((pathEntry != null) ? illiniCashRules[pathEntry] : null) ?? illiniCashRules[entry]) : null;
if ((illiniCashRule != null) && !_localeEvalIlliniCashRule(illiniCashRule)) {
if ((illiniCashRule != null) && !_localeEvalIlliniCashRule(illiniCashRule, buildContext: buildContext)) {
return false;
}

return super.localeIsEntryAvailable(entry, group: group, rules: rules);
return super.localeIsEntryAvailable(entry, group: group, rules: rules, buildContext: buildContext);
}

static bool _localeEvalIlliniCashRule(dynamic illiniCashRule) {
static bool _localeEvalIlliniCashRule(dynamic illiniCashRule, { rokwire.FlexUiBuildContext? buildContext }) {
bool result = true; // allow everything that is not defined or we do not understand
if (illiniCashRule is Map) {
illiniCashRule.forEach((dynamic key, dynamic value) {
Expand All @@ -121,8 +121,8 @@ class FlexUI extends rokwire.FlexUI {
}

@override
bool localeEvalAuthRule(dynamic authRule) {
bool result = super.localeEvalAuthRule(authRule);
bool localeEvalAuthRule(dynamic authRule, { rokwire.FlexUiBuildContext? buildContext }) {
bool result = super.localeEvalAuthRule(authRule, buildContext: buildContext);
if (result && (authRule is Map)) {
authRule.forEach((dynamic key, dynamic value) {
if (key is String) {
Expand Down
1 change: 0 additions & 1 deletion lib/ui/debug/DebugHomePanel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,6 @@ class _DebugHomePanelState extends State<DebugHomePanel> implements Notification
setState(() {
Storage().debugMessagesDisabled = (Storage().debugMessagesDisabled != true);
});
FlexUI().update();
}

void _onUseDeviceLocalTimeZoneToggled() {
Expand Down
2 changes: 1 addition & 1 deletion plugin

0 comments on commit 96c8c53

Please sign in to comment.