Skip to content

Commit bfe15e4

Browse files
committed
Released 9.2.7
1 parent a9af282 commit bfe15e4

File tree

15 files changed

+327
-251
lines changed

15 files changed

+327
-251
lines changed

common/lib/src/util/build.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ Future<void> _downloadArchive(FortniteBuildDownloadOptions options, Completer st
133133
throw _genericError;
134134
},
135135
headers: byteStart == null || byteStart <= 0 ? {
136-
"Cookie": "_c_t_c=1"
136+
137137
} : {
138-
"Cookie": "_c_t_c=1",
138+
139139
"Range": "bytes=${byteStart}-"
140140
},
141141
)

common/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
sdk: ">=3.0.0 <=4.0.0"
88

99
dependencies:
10-
dio: ^5.3.2
10+
dio: ^5.7.0
1111
win32: 3.0.0
1212
ffi: ^2.1.0
1313
path: ^1.8.3

gui/lib/l10n/reboot_en.arb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,5 +368,7 @@
368368
"automaticGameServerDialogStart": "Start server",
369369
"gameResetDefaultsName": "Reset",
370370
"gameResetDefaultsDescription": "Resets the game's settings to their default values",
371-
"gameResetDefaultsContent": "Reset"
371+
"gameResetDefaultsContent": "Reset",
372+
"selectFile": "Select a file",
373+
"reset": "Reset"
372374
}

gui/lib/src/controller/dll_controller.dart

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ class DllController extends GetxController {
109109
duration: null
110110
);
111111
}
112-
timestamp.value = await downloadRebootDll(url.text);
112+
final result = downloadRebootDll(url.text);
113+
timestamp.value = await Future.wait([result, Future.delayed(const Duration(seconds: 1))], eagerError: false)
114+
.then((_) => result);
113115
status.value = UpdateStatus.success;
114116
infoBarEntry?.close();
115117
if(!silent) {
@@ -126,15 +128,18 @@ class DllController extends GetxController {
126128
error = error.contains(": ") ? error.substring(error.indexOf(": ") + 2) : error;
127129
error = error.toLowerCase();
128130
status.value = UpdateStatus.error;
129-
showRebootInfoBar(
130-
translations.downloadDllError("reboot.dll", error.toString()),
131+
infoBarEntry = showRebootInfoBar(
132+
translations.downloadDllError(error.toString(), "reboot.dll"),
131133
duration: infoBarLongDuration,
132134
severity: InfoBarSeverity.error,
133135
action: Button(
134-
onPressed: () => updateGameServerDll(
135-
force: true,
136-
silent: silent
137-
),
136+
onPressed: () async {
137+
infoBarEntry?.close();
138+
updateGameServerDll(
139+
force: true,
140+
silent: silent
141+
);
142+
},
138143
child: Text(translations.downloadDllRetry),
139144
)
140145
);
@@ -215,7 +220,7 @@ class DllController extends GetxController {
215220
error = error.toLowerCase();
216221
final completer = Completer();
217222
await showRebootInfoBar(
218-
translations.downloadDllError(fileName, error.toString()),
223+
translations.downloadDllError(error.toString(), fileName),
219224
duration: infoBarLongDuration,
220225
severity: InfoBarSeverity.error,
221226
onDismissed: () => completer.complete(null),

gui/lib/src/messenger/implementation/error.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ void onError(Object exception, StackTrace? stackTrace, bool framework) {
1818
}
1919

2020
lastError = exception.toString();
21-
final route = ModalRoute.of(pageKey.currentContext!);
22-
if(route != null && !route.isCurrent){
23-
Navigator.of(pageKey.currentContext!).pop(false);
21+
if(inDialog){
22+
final context = pageKey.currentContext;
23+
if(context != null) {
24+
Navigator.of(context).pop(false);
25+
inDialog = false;
26+
}
2427
}
2528

2629
WidgetsBinding.instance.addPostFrameCallback((timeStamp) => showRebootDialog(

gui/lib/src/messenger/implementation/version.dart

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ import 'dart:isolate';
55
import 'package:fluent_ui/fluent_ui.dart';
66
import 'package:flutter/foundation.dart';
77
import 'package:get/get.dart';
8+
import 'package:get_storage/get_storage.dart';
89
import 'package:reboot_common/common.dart';
910
import 'package:reboot_launcher/src/controller/game_controller.dart';
1011
import 'package:reboot_launcher/src/messenger/abstract/dialog.dart';
12+
import 'package:reboot_launcher/src/util/os.dart';
1113
import 'package:reboot_launcher/src/util/translations.dart';
14+
import 'package:reboot_launcher/src/util/types.dart';
1215
import 'package:reboot_launcher/src/widget/file_selector.dart';
1316
import 'package:universal_disk_space/universal_disk_space.dart';
1417
import 'package:windows_taskbar/windows_taskbar.dart';
@@ -41,6 +44,7 @@ class _AddVersionDialogState extends State<AddVersionDialog> {
4144
SendPort? _downloadPort;
4245
Object? _error;
4346
StackTrace? _stackTrace;
47+
bool _selecting = false;
4448

4549
@override
4650
void initState() {
@@ -102,7 +106,12 @@ class _AddVersionDialogState extends State<AddVersionDialog> {
102106
return ErrorDialog(
103107
exception: _error ?? Exception(translations.unknownError),
104108
stackTrace: _stackTrace,
105-
errorMessageBuilder: (exception) => translations.downloadVersionError(exception.toString())
109+
errorMessageBuilder: (exception) {
110+
var error = exception.toString();
111+
error = error.after("Error: ")?.replaceAll(":", ",") ?? error.after(": ") ?? error;
112+
error = error.toLowerCase();
113+
return translations.downloadVersionError(error);
114+
}
106115
);
107116
case _DownloadStatus.done:
108117
return InfoDialog(
@@ -274,7 +283,8 @@ class _AddVersionDialogState extends State<AddVersionDialog> {
274283
);
275284
}
276285

277-
Widget _buildFormBody(List<FortniteBuild> builds) => Column(
286+
Widget _buildFormBody(List<FortniteBuild> builds) {
287+
return Column(
278288
mainAxisSize: MainAxisSize.min,
279289
crossAxisAlignment: CrossAxisAlignment.start,
280290
children: [
@@ -292,14 +302,16 @@ class _AddVersionDialogState extends State<AddVersionDialog> {
292302
windowTitle: _source.value == _BuildSource.local ? translations.gameFolderPlaceWindowTitle : translations.buildInstallationDirectoryWindowTitle,
293303
controller: _pathController,
294304
validator: _source.value == _BuildSource.local ? _checkGameFolder : _checkDownloadDestination,
295-
folder: true
305+
folder: true,
306+
allowNavigator: true
296307
),
297308

298309
const SizedBox(
299310
height: 16.0
300311
)
301312
],
302313
);
314+
}
303315

304316
String? _checkGameFolder(text) {
305317
if (text == null || text.isEmpty) {

gui/lib/src/page/implementation/backend_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ class _BackendPageState extends RebootPageState<BackendPage> {
153153
contentWidth: null,
154154
content: Row(
155155
children: [
156-
Text(
156+
Obx(() => Text(
157157
_backendController.detached.value ? translations.on : translations.off
158-
),
158+
)),
159159
const SizedBox(
160160
width: 16.0
161161
),

gui/lib/src/page/implementation/home_page.dart

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -298,48 +298,46 @@ class _HomePageState extends State<HomePage> with WindowListener, AutomaticKeepA
298298
});
299299
}
300300

301-
Widget _buildBody() {
302-
return Expanded(
303-
child: Padding(
304-
padding: EdgeInsets.only(
305-
left: HomePage.kDefaultPadding,
306-
right: HomePage.kDefaultPadding * 2,
307-
top: HomePage.kDefaultPadding,
308-
bottom: HomePage.kDefaultPadding * 2
309-
),
310-
child: Column(
311-
children: [
312-
Expanded(
313-
child: ConstrainedBox(
314-
constraints: BoxConstraints(
315-
maxWidth: 1000
316-
),
317-
child: Center(
318-
child: Column(
319-
children: [
320-
_buildBodyHeader(),
321-
const SizedBox(height: 24.0),
322-
Expanded(
323-
child: Stack(
324-
fit: StackFit.loose,
325-
children: [
326-
_buildBodyContent(),
327-
InfoBarArea(
328-
key: infoBarAreaKey
329-
)
330-
],
331-
)
332-
),
333-
],
334-
),
301+
Widget _buildBody() => Expanded(
302+
child: Padding(
303+
padding: EdgeInsets.only(
304+
left: HomePage.kDefaultPadding,
305+
right: HomePage.kDefaultPadding * 2,
306+
top: HomePage.kDefaultPadding,
307+
bottom: HomePage.kDefaultPadding * 2
308+
),
309+
child: Column(
310+
children: [
311+
Expanded(
312+
child: ConstrainedBox(
313+
constraints: BoxConstraints(
314+
maxWidth: 1000
315+
),
316+
child: Center(
317+
child: Column(
318+
children: [
319+
_buildBodyHeader(),
320+
const SizedBox(height: 24.0),
321+
Expanded(
322+
child: Stack(
323+
fit: StackFit.loose,
324+
children: [
325+
_buildBodyContent(),
326+
InfoBarArea(
327+
key: infoBarAreaKey
328+
)
329+
],
330+
)
331+
),
332+
],
335333
),
336334
),
337-
)
338-
],
339-
)
340-
),
341-
);
342-
}
335+
),
336+
)
337+
],
338+
)
339+
),
340+
);
343341

344342
Widget _buildBodyContent() => PageView.builder(
345343
controller: _pageController,

0 commit comments

Comments
 (0)