Skip to content

Commit

Permalink
Merge pull request #272 from LittleLightForDestiny/v2.0.3-fixes
Browse files Browse the repository at this point in the history
fixes postmaster and engrams for landscape layout
  • Loading branch information
joaopmarquesini authored Jul 20, 2023
2 parents 88f55d4 + d0cab9e commit 2dc4d89
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:enableOnBackInvokedCallback="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
13 changes: 7 additions & 6 deletions lib/core/littlelight.app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ class _LittleLightAppState extends State<LittleLightApp> with AnalyticsConsumer,
@override
void initState() {
super.initState();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
systemNavigationBarColor: Colors.black.withOpacity(0.002),
),
);
LittleLightNavigatorKeyContainer.navigatorKey = GlobalKey<NavigatorState>();
unilinks?.addListener(updateUnilinks);
updateSystemOverlay();
}

void updateSystemOverlay() async {
await Future.delayed(Duration(milliseconds: 10));
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent));
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class EquipmentCharacterLandscapeTabContentWidget extends StatelessWidget {
currencies: currencies,
),
),
...buildSingleColumnSections(context, InventoryBucket.lostItems, constraints, omitEmpty: true),
...buildSingleColumnSections(context, InventoryBucket.engrams, constraints, omitEmpty: true),
buildMultiColumnSection(context, [InventoryBucket.subclass, InventoryBucket.helmet], constraints),
buildMultiColumnSection(
context, [InventoryBucket.kineticWeapons, InventoryBucket.gauntlets], constraints),
Expand Down Expand Up @@ -109,12 +111,16 @@ class EquipmentCharacterLandscapeTabContentWidget extends StatelessWidget {
List<ScrollableSection> buildSingleColumnSections(
BuildContext context,
int bucketHash,
BoxConstraints constraints,
) {
BoxConstraints constraints, {
bool omitEmpty = false,
}) {
final bucketContent = buckets[bucketHash];
if (bucketContent == null) return [];
final equipped = bucketContent.equipped;
final unequipped = bucketContent.unequipped;
if (omitEmpty && equipped == null && unequipped.isEmpty) {
return [];
}
final defaultDisplayType = _defaultDisplayTypes[bucketHash] ?? BucketDisplayType.Medium;
final displayType = bucketOptionsState(context).getDisplayTypeForItemSection(
"$bucketHash",
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/settings/pages/about/about.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _AboutScreenState extends State<AboutScreen> with StorageConsumer, LittleL
final info = await PackageInfo.fromPlatform();
packageVersion = info.version;
appName = info.appName;
if (Platform.isIOS) {
if (Platform.isIOS || Platform.isMacOS) {
final lastUpdated = globalStorage.lastUpdated;
final now = DateTime.now();
if (lastUpdated == null || now.difference(lastUpdated).inDays < 3) {
Expand Down
2 changes: 0 additions & 2 deletions lib/pages/main.screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:little_light/core/blocs/offline_mode/offline_mode.bloc.dart';
import 'package:little_light/core/blocs/user_settings/user_settings.bloc.dart';
import 'package:little_light/modules/collections/pages/home/collections_home.page.dart';
Expand Down
3 changes: 1 addition & 2 deletions lib/shared/widgets/selection/selected_items.widget.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:little_light/core/blocs/inventory/inventory.bloc.dart';
import 'package:little_light/core/blocs/language/language.consumer.dart';
import 'package:little_light/models/item_info/destiny_item_info.dart';
import 'package:little_light/core/blocs/selection/selection.bloc.dart';
import 'package:little_light/core/theme/littlelight.theme.dart';
import 'package:little_light/models/item_info/destiny_item_info.dart';
import 'package:little_light/shared/widgets/loading/default_loading_shimmer.dart';
import 'package:little_light/shared/widgets/selection/selected_item_instance.widget.dart';
import 'package:little_light/shared/widgets/selection/selected_item_thumb.widget.dart';
Expand Down

0 comments on commit 2dc4d89

Please sign in to comment.