Skip to content

Commit a3e58b5

Browse files
authored
Merge pull request #310 from Manuito83/develop
Merge for 3.7.1
2 parents 37c95d9 + dc006f1 commit a3e58b5

File tree

17 files changed

+452
-87
lines changed

17 files changed

+452
-87
lines changed

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ if (localPropertiesFile.exists()) {
1616

1717
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1818
if (flutterVersionCode == null) {
19-
flutterVersionCode = '492'
19+
flutterVersionCode = '497'
2020
}
2121

2222
def flutterVersionName = localProperties.getProperty('flutter.versionName')
2323
if (flutterVersionName == null) {
24-
flutterVersionName = '3.7.0'
24+
flutterVersionName = '3.7.1'
2525
}
2626

2727
def keystoreProperties = new Properties()

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ target 'Runner' do
3535

3636
# This line needs to be updated with the version or commented out (in which case build will take longer, but nothing else)
3737
# Version at https://github.com/invertase/firestore-ios-sdk-frameworks
38-
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.6.0'
38+
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.7.0'
3939
end
4040

4141
post_install do |installer|

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
550550
CODE_SIGN_IDENTITY = "Apple Development";
551551
CODE_SIGN_STYLE = Automatic;
552-
CURRENT_PROJECT_VERSION = 492;
552+
CURRENT_PROJECT_VERSION = 497;
553553
DEVELOPMENT_ASSET_PATHS = "";
554554
DEVELOPMENT_TEAM = 53KVJRJS99;
555555
ENABLE_BITCODE = NO;
@@ -567,7 +567,7 @@
567567
"$(inherited)",
568568
"$(PROJECT_DIR)/Flutter",
569569
);
570-
MARKETING_VERSION = 3.7.0;
570+
MARKETING_VERSION = 3.7.1;
571571
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
572572
PRODUCT_NAME = "$(TARGET_NAME)";
573573
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -698,7 +698,7 @@
698698
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
699699
CODE_SIGN_IDENTITY = "Apple Development";
700700
CODE_SIGN_STYLE = Automatic;
701-
CURRENT_PROJECT_VERSION = 492;
701+
CURRENT_PROJECT_VERSION = 497;
702702
DEVELOPMENT_ASSET_PATHS = "";
703703
DEVELOPMENT_TEAM = 53KVJRJS99;
704704
ENABLE_BITCODE = NO;
@@ -716,7 +716,7 @@
716716
"$(inherited)",
717717
"$(PROJECT_DIR)/Flutter",
718718
);
719-
MARKETING_VERSION = 3.7.0;
719+
MARKETING_VERSION = 3.7.1;
720720
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
721721
PRODUCT_NAME = "$(TARGET_NAME)";
722722
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -739,7 +739,7 @@
739739
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
740740
CODE_SIGN_IDENTITY = "Apple Development";
741741
CODE_SIGN_STYLE = Automatic;
742-
CURRENT_PROJECT_VERSION = 492;
742+
CURRENT_PROJECT_VERSION = 497;
743743
DEVELOPMENT_ASSET_PATHS = "";
744744
DEVELOPMENT_TEAM = 53KVJRJS99;
745745
ENABLE_BITCODE = NO;
@@ -757,7 +757,7 @@
757757
"$(inherited)",
758758
"$(PROJECT_DIR)/Flutter",
759759
);
760-
MARKETING_VERSION = 3.7.0;
760+
MARKETING_VERSION = 3.7.1;
761761
PRODUCT_BUNDLE_IDENTIFIER = com.manuito.tornpda;
762762
PRODUCT_NAME = "$(TARGET_NAME)";
763763
PROVISIONING_PROFILE_SPECIFIER = "";

ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>FlutterDeepLinkingEnabled</key>
6+
<false/>
57
<key>CADisableMinimumFrameDurationOnPhone</key>
68
<true/>
79
<key>CFBundleDevelopmentRegion</key>

lib/drawer.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ class DrawerPageState extends State<DrawerPage> with WidgetsBindingObserver, Aut
332332
"tornexchange_enabled": true,
333333
"use_browser_cache": "user", // user, on, off
334334
"dynamic_appIcon_enabled": "false",
335+
"favicons_remove": "false",
335336
// Revives
336337
"revive_hela": "1 million or 1 Xanax",
337338
"revive_revive": "1 million or 1 Xanax",

lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ import 'package:wakelock_plus/wakelock_plus.dart';
6868
import 'package:workmanager/workmanager.dart';
6969

7070
// TODO (App release)
71-
const String appVersion = '3.7.0';
72-
const String androidCompilation = '492';
73-
const String iosCompilation = '492';
71+
const String appVersion = '3.7.1';
72+
const String androidCompilation = '497';
73+
const String iosCompilation = '497';
7474

7575
// TODO (App release)
7676
// Note: if using Windows and calling HTTP functions, we need to change the URL in [firebase_functions.dart]
@@ -137,7 +137,7 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
137137
sender = parts.isNotEmpty ? parts[0].trim() : "";
138138
msg = parts.length > 1 ? parts.sublist(1).join(":").trim() : "";
139139

140-
await showSendbirdNotification(sender, msg, channelUrl);
140+
await showSendbirdNotification(sender, msg, channelUrl, fromBackground: true);
141141
}
142142
} catch (e) {
143143
if (!Platform.isWindows) FirebaseCrashlytics.instance.log("PDA Crash at Messaging Background Handler");

lib/pages/alerts.dart

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ class AlertsSettingsState extends State<AlertsSettings> {
10341034
children: [
10351035
Icon(Icons.keyboard_arrow_right_outlined),
10361036
const Padding(
1037-
padding: EdgeInsets.only(left: 10),
1037+
padding: EdgeInsets.only(left: 17),
10381038
child: Text(
10391039
"Do not disturb",
10401040
style: TextStyle(
@@ -1059,6 +1059,43 @@ class AlertsSettingsState extends State<AlertsSettings> {
10591059
],
10601060
),
10611061
),
1062+
if (sendbird.sendBirdNotificationsEnabled)
1063+
Padding(
1064+
padding: const EdgeInsets.only(left: 30, right: 8),
1065+
child: Row(
1066+
children: [
1067+
Icon(Icons.keyboard_arrow_right_outlined),
1068+
Flexible(
1069+
child: CheckboxListTile(
1070+
checkColor: Colors.white,
1071+
activeColor: Colors.red[900],
1072+
value: sendbird.excludeFactionMessages,
1073+
title: Row(
1074+
children: [
1075+
Text(
1076+
"Exclude faction messages",
1077+
style: TextStyle(
1078+
fontSize: 14,
1079+
fontStyle: FontStyle.italic,
1080+
),
1081+
),
1082+
],
1083+
),
1084+
subtitle: const Text(
1085+
"Faction messages won't be shown",
1086+
style: TextStyle(
1087+
fontSize: 12,
1088+
fontStyle: FontStyle.italic,
1089+
),
1090+
),
1091+
onChanged: (enabled) async {
1092+
sendbird.excludeFactionMessages = enabled!;
1093+
},
1094+
),
1095+
),
1096+
],
1097+
),
1098+
),
10621099
],
10631100
);
10641101
},

lib/pages/profile_page.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ class ProfilePageState extends State<ProfilePage> with WidgetsBindingObserver {
16931693
);
16941694
}
16951695

1696-
late Widget alertsButton;
1696+
Widget? alertsButton;
16971697
if (Platform.isAndroid) {
16981698
alertsButton = Row(
16991699
children: [
@@ -1764,6 +1764,8 @@ class ProfilePageState extends State<ProfilePage> with WidgetsBindingObserver {
17641764
size: 20,
17651765
),
17661766
);
1767+
} else {
1768+
alertsButton = const SizedBox.shrink();
17671769
}
17681770

17691771
Widget buttonsRow;
@@ -7216,7 +7218,7 @@ class ProfilePageState extends State<ProfilePage> with WidgetsBindingObserver {
72167218
});
72177219
}
72187220

7219-
String headerString = "$currentPoints job points";
7221+
String headerString = "${currentPoints ?? '0'} job point${currentPoints == 1 ? '' : 's'}";
72207222
if (unemployed) {
72217223
headerString = "Unemployed";
72227224
}

lib/pages/settings/settings_browser.dart

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
875875
),
876876
),
877877
Padding(
878-
padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
878+
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
879879
child: Text(
880880
'Enable this option if you are getting logged out from Torn consistently; '
881881
'Torn PDA will try to reestablish your session ID when the browser opens',
@@ -886,6 +886,37 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
886886
),
887887
),
888888
),
889+
Padding(
890+
padding: const EdgeInsets.fromLTRB(20, 20, 20, 0),
891+
child: Row(
892+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
893+
children: <Widget>[
894+
Flexible(child: const Text("Do not pause webviews")),
895+
Switch(
896+
value: _webViewProvider.browserDoNotPauseWebview,
897+
onChanged: (value) {
898+
setState(() {
899+
_webViewProvider.browserDoNotPauseWebview = value;
900+
});
901+
},
902+
activeTrackColor: Colors.lightGreenAccent,
903+
activeColor: Colors.green,
904+
),
905+
],
906+
),
907+
),
908+
Padding(
909+
padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
910+
child: Text(
911+
'This will prevent the browser from pausing when the app or browser are in the background. '
912+
'NOTE: it is NOT recommended to activate this setting, as it will consume more battery and resources',
913+
style: TextStyle(
914+
color: Colors.grey[600],
915+
fontSize: 12,
916+
fontStyle: FontStyle.italic,
917+
),
918+
),
919+
),
889920
],
890921
);
891922
}
@@ -1801,6 +1832,35 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
18011832
),
18021833
),
18031834
),
1835+
if (_browserStyle == 0)
1836+
Column(
1837+
children: [
1838+
Padding(
1839+
padding: const EdgeInsets.symmetric(horizontal: 20),
1840+
child: Row(
1841+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
1842+
children: <Widget>[
1843+
Flexible(child: const Text("Show navigation arrows")),
1844+
_navArrowsDropdown(),
1845+
],
1846+
),
1847+
),
1848+
Padding(
1849+
padding: const EdgeInsets.symmetric(horizontal: 20),
1850+
child: Text(
1851+
'When using the default browser style, forward and backward navigation arrows will be shown '
1852+
'by default when using a wide enough screen. You can disable them or make them also visible '
1853+
'on narrower screens (bear in mind that this might interfere with the space available for page title)',
1854+
style: TextStyle(
1855+
color: Colors.grey[600],
1856+
fontSize: 12,
1857+
fontStyle: FontStyle.italic,
1858+
),
1859+
),
1860+
),
1861+
],
1862+
),
1863+
18041864
/*
18051865
Padding(
18061866
padding: const EdgeInsets.symmetric(horizontal: 20),
@@ -3522,6 +3582,79 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
35223582
);
35233583
}
35243584

3585+
Widget _navArrowsDropdown() {
3586+
return DropdownButton<String>(
3587+
value: _settingsProvider.browserShowNavArrowsAppbar,
3588+
items: const [
3589+
DropdownMenuItem(
3590+
value: "off",
3591+
child: SizedBox(
3592+
width: 100,
3593+
child: Text(
3594+
"Off",
3595+
textAlign: TextAlign.right,
3596+
style: TextStyle(
3597+
fontSize: 12,
3598+
),
3599+
),
3600+
),
3601+
),
3602+
DropdownMenuItem(
3603+
value: "narrow",
3604+
child: SizedBox(
3605+
width: 100,
3606+
child: Text(
3607+
"Always",
3608+
textAlign: TextAlign.right,
3609+
style: TextStyle(
3610+
fontSize: 12,
3611+
),
3612+
),
3613+
),
3614+
),
3615+
DropdownMenuItem(
3616+
value: "wide",
3617+
child: SizedBox(
3618+
width: 100,
3619+
child: Text(
3620+
"Wide screen",
3621+
textAlign: TextAlign.right,
3622+
style: TextStyle(
3623+
fontSize: 12,
3624+
),
3625+
),
3626+
),
3627+
),
3628+
],
3629+
onChanged: (value) {
3630+
if (value == null) return;
3631+
setState(() {
3632+
_settingsProvider.browserShowNavArrowsAppbar = value;
3633+
});
3634+
3635+
if (_settingsProvider.browserShowNavArrowsAppbar == "narrow") {
3636+
double width = MediaQuery.of(context).size.width;
3637+
if (width < 500) {
3638+
BotToast.showText(
3639+
clickClose: true,
3640+
text: "Please note that your current screen configuration (${width.round()} DPI) might "
3641+
"not be wide enough to display the navigation arrows in all circumstances (e.g. when other "
3642+
"icons are present, such as when chaining)."
3643+
"\n\nRemember you can always swipe left or right in the page title to navigate.",
3644+
textStyle: const TextStyle(
3645+
fontSize: 14,
3646+
color: Colors.white,
3647+
),
3648+
contentColor: Colors.blue[600]!,
3649+
duration: const Duration(seconds: 15),
3650+
contentPadding: const EdgeInsets.all(10),
3651+
);
3652+
}
3653+
}
3654+
},
3655+
);
3656+
}
3657+
35253658
/*
35263659
DropdownButton _profileStatsDropdown() {
35273660
return DropdownButton<String>(

lib/providers/sendbird_controller.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ class SendbirdController extends GetxController {
2828
TimeOfDay endTime = TimeOfDay(hour: 0, minute: 0);
2929
String timeZoneName = DateTime.now().timeZoneName;
3030

31+
bool _excludeFactionMessages = false;
32+
bool get excludeFactionMessages => _excludeFactionMessages;
33+
set excludeFactionMessages(bool value) {
34+
_excludeFactionMessages = value;
35+
Prefs().setSendbirdExcludeFactionMessages(value);
36+
update();
37+
}
38+
3139
bool _sendBirdNotificationsEnabled = false;
3240
bool get sendBirdNotificationsEnabled => _sendBirdNotificationsEnabled;
3341
sendBirdNotificationsToggle({required bool enabled}) async {
@@ -58,6 +66,7 @@ class SendbirdController extends GetxController {
5866
if (_initialised) return;
5967
_initialised = true;
6068

69+
_excludeFactionMessages = await Prefs().getSendbirdExcludeFactionMessages();
6170
_sendBirdNotificationsEnabled = await Prefs().getSendbirdNotificationsEnabled();
6271

6372
try {

0 commit comments

Comments
 (0)