Skip to content

Commit

Permalink
Merge pull request #327 from LittleLightForDestiny/v2_0_17_fixes
Browse files Browse the repository at this point in the history
fixes some issues
  • Loading branch information
joaopmarquesini authored Jan 8, 2024
2 parents 67cd907 + 6eefe0b commit 808af5c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 22 deletions.
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ PODS:
- Firebase/Crashlytics (10.18.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.18.0)
- firebase_analytics (10.7.4):
- firebase_analytics (10.8.0):
- Firebase/Analytics (= 10.18.0)
- firebase_core
- Flutter
- firebase_core (2.24.2):
- Firebase/CoreOnly (= 10.18.0)
- Flutter
- firebase_crashlytics (3.4.8):
- firebase_crashlytics (3.4.9):
- Firebase/Crashlytics (= 10.18.0)
- firebase_core
- Flutter
Expand Down Expand Up @@ -209,9 +209,9 @@ SPEC CHECKSUMS:
app_links: 5ef33d0d295a89d9d16bb81b0e3b0d5f70d6c875
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_analytics: 88c111412070acc2b05c1734151f58824f3db657
firebase_analytics: b3d6dd14c61549a29abb10e9843446a4d8bb53eb
firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5
firebase_crashlytics: 55714f63ae0973c54b3a721c451ae5f815086c1f
firebase_crashlytics: 4b91b8ad60ee7c168fe88979f84c9573a729de7a
FirebaseAnalytics: 4d310b35c48eaa4a058ddc04bdca6bdb5dc0fe80
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreExtension: c08d14c7b22e07994e876d837e6f58642f340087
Expand All @@ -232,7 +232,7 @@ SPEC CHECKSUMS:
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47

PODFILE CHECKSUM: 729aa3f0081d3d7dfc596cc5eb638979e3b2966a
Expand Down
14 changes: 11 additions & 3 deletions lib/core/blocs/inventory/inventory.bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,8 @@ class InventoryBloc extends ChangeNotifier with ManifestConsumer {
final transferrableItems = _profileBloc.allInstancedItems
.where((item) {
final isOnTargetCharacter = item.characterId == destination.characterId;
final wasTransferred = transferredIds.contains(item.instanceId);
final isEquipped = item.isEquipped ?? false;
return isOnTargetCharacter && !wasTransferred && !isEquipped;
return isOnTargetCharacter && !isEquipped;
})
.toList()
.reversed;
Expand All @@ -959,7 +958,16 @@ class InventoryBloc extends ChangeNotifier with ManifestConsumer {
final itemsInBucket = transferrableItems.where((item) => item.bucketHash == bucketHash);
final itemsInBucketCount = itemsInBucket.length;
final itemsToTransferCount = (freeSlots - (bucketSize - itemsInBucketCount)).clamp(0, bucketSize);
final itemsToTransfer = itemsInBucket.take(itemsToTransferCount);
final itemsToTransfer = itemsInBucket
.where(
(i) => !transferredIds.contains(i.instanceId),
)
.take(itemsToTransferCount);
print("${bucketDef?.displayProperties?.name}");
print("items in bucket: ${itemsInBucketCount}");
print("free slots: ${freeSlots}");
print("bucket Size: ${bucketSize}");
print("items to transfer: ${itemsToTransferCount}");
for (final item in itemsToTransfer) {
final action = await _addTransferToQueue(
item,
Expand Down
3 changes: 3 additions & 0 deletions lib/pages/main.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import 'package:little_light/widgets/side_menu/side_menu.widget.dart';
import 'package:provider/provider.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

final MainScreenScaffoldGlobalKey = GlobalKey<ScaffoldState>();

class MainScreen extends StatefulWidget {
const MainScreen({Key? key}) : super(key: key);
@override
Expand Down Expand Up @@ -82,6 +84,7 @@ class MainScreenState extends State<MainScreen> with AuthConsumer {
return PopScope(
onPopInvoked: (_) => _exitApp(context),
child: Scaffold(
key: MainScreenScaffoldGlobalKey,
drawer: Container(
child: SideMenuWidget(
onPageChange: (page) {
Expand Down
17 changes: 7 additions & 10 deletions lib/widgets/side_menu/side_menu.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import 'package:little_light/modules/triumphs/pages/home/triumphs_home.page.dart
import 'package:little_light/modules/duplicated_items/pages/duplicated_items/duplicated_items.page.dart';
import 'package:little_light/pages/languages/languages.page_route.dart';
import 'package:little_light/modules/vendors/pages/home/vendors_home.page.dart';
import 'package:little_light/pages/main.screen.dart';
import 'package:little_light/services/auth/auth.consumer.dart';
import 'package:little_light/utils/platform_data.dart';
import 'package:little_light/widgets/side_menu/profile_info.widget.dart';
Expand Down Expand Up @@ -148,25 +149,21 @@ class SideMenuWidgetState extends State<SideMenuWidget> with AuthConsumer {
child: label)));
}

open(BuildContext context, Widget screen) {
Navigator.of(context).pop();
void open(BuildContext context, Widget screen) {
MainScreenScaffoldGlobalKey.currentState?.closeDrawer();
widget.onPageChange?.call(screen);
}

pushRoute(BuildContext context, MaterialPageRoute route) {
Navigator.of(context).pop();
void pushRoute(BuildContext context, MaterialPageRoute route) {
MainScreenScaffoldGlobalKey.currentState?.closeDrawer();
Navigator.of(context).push(route);
}

addAccount(BuildContext context) async {
void addAccount(BuildContext context) async {
auth.openBungieLogin(true);
}

changeLanguage(BuildContext context) {
void changeLanguage(BuildContext context) {
pushRoute(context, LanguagesPageRoute());
}

manageAccounts(BuildContext context) {
// open(context, AccountsScreen());
}
}
8 changes: 4 additions & 4 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ PODS:
- Firebase/Crashlytics (10.18.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.18.0)
- firebase_analytics (10.7.4):
- firebase_analytics (10.8.0):
- Firebase/Analytics (= 10.18.0)
- firebase_core
- FlutterMacOS
- firebase_core (2.24.2):
- Firebase/CoreOnly (~> 10.18.0)
- FlutterMacOS
- firebase_crashlytics (3.4.8):
- firebase_crashlytics (3.4.9):
- Firebase/CoreOnly (~> 10.18.0)
- Firebase/Crashlytics (~> 10.18.0)
- firebase_core
Expand Down Expand Up @@ -205,9 +205,9 @@ SPEC CHECKSUMS:
app_links: 4481ed4d71f384b0c3ae5016f4633aa73d32ff67
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_analytics: bf181e2a4e102386a8011ed7ea775ce0f090833a
firebase_analytics: 687a47ef9af9c5a8a9fc612c100987f843d0a281
firebase_core: a74ee8b3ab5f91ae6b73f4913eaca996c24458b6
firebase_crashlytics: 71c0279d6154ae41f5486df50fa577c135ac8863
firebase_crashlytics: 7737524301b6d746a563fa7fdb0ea311922d638a
FirebaseAnalytics: 4d310b35c48eaa4a058ddc04bdca6bdb5dc0fe80
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
FirebaseCoreExtension: c08d14c7b22e07994e876d837e6f58642f340087
Expand Down

0 comments on commit 808af5c

Please sign in to comment.