Skip to content

Commit

Permalink
Merge pull request #256 from Manuito83/develop
Browse files Browse the repository at this point in the history
Merge develop for v3.4.1
  • Loading branch information
Manuito83 committed May 5, 2024
2 parents bdf239d + 71a5e6b commit 76be95e
Show file tree
Hide file tree
Showing 46 changed files with 1,185 additions and 714 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*.ipr
*.iws
.idea/*
.idx/*
!.idea/codeStyles/

# The .vscode folder contains launch configuration and tasks you configure in
Expand All @@ -33,6 +34,7 @@
.pub-cache/
.pub/
/build/
/devtools_options.yaml

# Firebase
**/android/app/google-services.json
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ if (localPropertiesFile.exists()) {

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '412'
flutterVersionCode = '415'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '3.4.0'
flutterVersionName = '3.4.1'
}

def keystoreProperties = new Properties()
Expand Down
Binary file added images/torn_items/small/1353_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1354_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1355_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1356_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1357_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1358_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1359_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1360_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1363_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1364_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1365_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1366_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1367_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1368_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1369_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1370_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1371_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1372_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1373_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1374_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1375_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1376_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1377_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/torn_items/small/1378_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 412;
CURRENT_PROJECT_VERSION = 415;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 53KVJRJS99;
ENABLE_BITCODE = NO;
Expand All @@ -545,7 +545,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -671,7 +671,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 412;
CURRENT_PROJECT_VERSION = 415;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 53KVJRJS99;
ENABLE_BITCODE = NO;
Expand All @@ -689,7 +689,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -709,7 +709,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 412;
CURRENT_PROJECT_VERSION = 415;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 53KVJRJS99;
ENABLE_BITCODE = NO;
Expand All @@ -727,7 +727,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ import 'package:wakelock_plus/wakelock_plus.dart';
import 'package:workmanager/workmanager.dart';

// TODO (App release)
const String appVersion = '3.4.0';
const String androidCompilation = '412';
const String iosCompilation = '412';
const String appVersion = '3.4.1';
const String androidCompilation = '415';
const String iosCompilation = '415';

// TODO (App release)
const bool pointFunctionsEmulatorToLocal = false;
Expand Down
2 changes: 1 addition & 1 deletion lib/models/chaining/tsc/tsc_response_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Estimate {
});

factory Estimate.fromJson(Map<String, dynamic> json) => Estimate(
stats: json["stats"],
stats: json["stats"].toString(),
lastUpdated: DateTime.parse(json["lastUpdated"]),
);

Expand Down
8 changes: 7 additions & 1 deletion lib/pages/chaining/targets_backup_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ class TargetsBackupPageState extends State<TargetsBackupPage> {
contentPadding: const EdgeInsets.all(10),
);
} else {
Share.share(export);
Share.share(export, sharePositionOrigin: Rect.fromLTWH(
0,
0,
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height / 2,
),
);
}
},
),
Expand Down
59 changes: 42 additions & 17 deletions lib/pages/chaining/war_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import 'package:torn_pda/utils/html_parser.dart';
import 'package:torn_pda/widgets/chaining/chain_widget.dart';
import 'package:torn_pda/widgets/chaining/war_card.dart';
import 'package:torn_pda/widgets/revive/hela_revive_button.dart';
import 'package:torn_pda/widgets/revive/midnightX_revive_button.dart';
import 'package:torn_pda/widgets/revive/midnightx_revive_button.dart';
import 'package:torn_pda/widgets/revive/nuke_revive_button.dart';
import 'package:torn_pda/widgets/revive/uhc_revive_button.dart';
import 'package:torn_pda/widgets/revive/wtf_revive_button.dart';
Expand Down Expand Up @@ -92,6 +92,8 @@ class WarPageState extends State<WarPage> {

final _chainWidgetKey = GlobalKey();

Timer? _updatedTicker;

final WarController _w = Get.find<WarController>();
ThemeProvider? _themeProvider;
SettingsProvider? _settingsProvider;
Expand Down Expand Up @@ -136,6 +138,8 @@ class WarPageState extends State<WarPage> {

_performQuickUpdate(firstTime: true);

_updatedTicker = Timer.periodic(const Duration(seconds: 30), (Timer t) => _w.assessPendingNotifications());

routeWithDrawer = true;
routeName = "chaining_war";
}
Expand All @@ -144,6 +148,7 @@ class WarPageState extends State<WarPage> {
Future dispose() async {
_addIdController.dispose();
_searchController.dispose();
_updatedTicker?.cancel();
_w.stopUpdate();
Get.delete<WarController>();
super.dispose();
Expand Down Expand Up @@ -233,7 +238,7 @@ class WarPageState extends State<WarPage> {
children: [
_onlineFilter(),
const SizedBox(width: 10),
_okayFilter(w),
_okayRedFilter(w),
const SizedBox(width: 10),
_countryFilter(w),
const SizedBox(width: 5),
Expand All @@ -248,7 +253,7 @@ class WarPageState extends State<WarPage> {
child: WarTargetsList(
warController: w,
offlineSelector: w.onlineFilter,
okayFilterActive: w.okayFilter,
okayRedFilterActive: w.okayRedFilter,
countryFilterActive: w.countryFilter,
travelingFilterActive: w.travelingFilter,
),
Expand All @@ -257,7 +262,7 @@ class WarPageState extends State<WarPage> {
WarTargetsList(
warController: w,
offlineSelector: w.onlineFilter,
okayFilterActive: w.okayFilter,
okayRedFilterActive: w.okayRedFilter,
countryFilterActive: w.countryFilter,
travelingFilterActive: w.travelingFilter,
),
Expand Down Expand Up @@ -344,16 +349,20 @@ class WarPageState extends State<WarPage> {
);
}

Widget _okayFilter(WarController w) {
Widget _okayRedFilter(WarController w) {
return SizedBox(
height: 25,
child: ToggleSwitch(
customWidths: const [32],
customWidths: const [32, 32],
borderWidth: 1,
cornerRadius: 5,
doubleTapDisable: true,
borderColor: _themeProvider!.currentTheme == AppTheme.light ? [Colors.blueGrey] : [Colors.grey[900]!],
initialLabelIndex: !w.okayFilter ? null : 0,
initialLabelIndex: _w.okayRedFilter == 0
? null
: _w.okayRedFilter == 1
? 0
: 1,
activeBgColor: _themeProvider!.currentTheme == AppTheme.light
? [Colors.blueGrey]
: _themeProvider!.currentTheme == AppTheme.dark
Expand All @@ -366,22 +375,30 @@ class WarPageState extends State<WarPage> {
? Colors.grey[800]
: Colors.black,
inactiveFgColor: _themeProvider!.currentTheme == AppTheme.light ? Colors.black : Colors.white,
totalSwitches: 1,
totalSwitches: 2,
animate: true,
animationDuration: 500,
customIcons: const [
Icon(
MdiIcons.accountCheckOutline,
MdiIcons.check,
size: 12,
color: Colors.green,
),
Icon(
MdiIcons.hospital,
size: 12,
color: Colors.red,
),
],
onToggle: (index) async {
await _performQuickUpdate(forceIntegrityCheck: false);

if (index == null) {
_w.setOkayFilterActive(false);
} else {
_w.setOkayFilterActive(true);
_w.setOkayRedFilter(0);
} else if (index == 0) {
_w.setOkayRedFilter(1);
} else if (index == 1) {
_w.setOkayRedFilter(2);
}

String message;
Expand Down Expand Up @@ -1520,14 +1537,14 @@ class WarTargetsList extends StatefulWidget {
const WarTargetsList({
required this.warController,
required this.offlineSelector,
required this.okayFilterActive,
required this.okayRedFilterActive,
required this.countryFilterActive,
required this.travelingFilterActive,
});

final WarController warController;
final int offlineSelector;
final bool okayFilterActive;
final int okayRedFilterActive;
final bool countryFilterActive;
final bool travelingFilterActive;

Expand Down Expand Up @@ -1620,7 +1637,11 @@ class WarTargetsListState extends State<WarTargetsList> {
continue;
}

if (widget.okayFilterActive && thisMember.status!.color == "red") {
if (widget.okayRedFilterActive == 1 && thisMember.status!.color == "red") {
continue;
}

if (widget.okayRedFilterActive == 2 && thisMember.status!.color != "red") {
continue;
}

Expand All @@ -1639,9 +1660,13 @@ class WarTargetsListState extends State<WarTargetsList> {

//filteredCards.add(WarCard(memberModel: thisMember));
if (thisMember.pinned) {
pinnedMembers.add(WarCard(memberModel: thisMember));
pinnedMembers.add(
WarCard(memberModel: thisMember),
);
} else {
nonPinnedMembers.add(WarCard(memberModel: thisMember));
nonPinnedMembers.add(
WarCard(memberModel: thisMember),
);
}
}

Expand Down
10 changes: 9 additions & 1 deletion lib/pages/friends/friends_backup_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,15 @@ class FriendsBackupPageState extends State<FriendsBackupPage> {
contentPadding: const EdgeInsets.all(10),
);
} else {
Share.share(export);
Share.share(
export,
sharePositionOrigin: Rect.fromLTWH(
0,
0,
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height / 2,
),
);
}
},
),
Expand Down
Loading

0 comments on commit 76be95e

Please sign in to comment.