Commit 7074fd2
Changed files (3)
app
lib
data_util
test
data_util
app/lib/data_util/interval_picker.dart
@@ -39,9 +39,9 @@ class IntervalPicker extends StatelessWidget {
const SizedBox(height: 2),
Row(
children: [
- IconButton(
- onPressed: () => intervall.moveDataRangeByStep(-1),
- icon: const Icon(Icons.chevron_left, size: 48),
+ MaterialButton(
+ onPressed: () => intervall.moveDataRangeByStep(-11),
+ child: const Icon(Icons.chevron_left, size: 48),
),
Expanded(
child: DropdownButton<TimeStep>(
app/lib/app.dart
@@ -165,8 +165,10 @@ class _AppState extends State<App> {
);
File(join(dbPath, 'config.db')).copySync(join(dbPath, 'v39_config.db.backup'));
File(join(dbPath, 'config.db')).deleteSync();
- File(join(dbPath, 'config.db-journal')).copySync(join(dbPath, 'v39_config.db-journal.backup'));
- File(join(dbPath, 'config.db-journal')).deleteSync();
+ if (File(join(dbPath, 'config.db-journal')).existsSync()) {
+ File(join(dbPath, 'config.db-journal')).copySync(join(dbPath, 'v39_config.db-journal.backup'));
+ File(join(dbPath, 'config.db-journal')).deleteSync();
+ }
} catch (e, stack) {
await ErrorReporting.reportCriticalError('Error upgrading to file based settings:', '$e\n$stack',);
}
app/test/data_util/interval_picker_test.dart
@@ -15,6 +15,7 @@ void main() {
child: IntervalPicker(type: IntervalStoreManagerLocation.mainPage)
)));
expect(find.byType(DropdownButton<TimeStep>), findsOneWidget);
+ expect(find.byType(MaterialButton), findsNWidgets(2));
expect(find.byIcon(Icons.chevron_left), findsOneWidget);
expect(find.byIcon(Icons.chevron_right), findsOneWidget);
expect(
@@ -59,6 +60,5 @@ void main() {
await tester.tap(find.text(localizations.custom));
await tester.pumpAndSettle();
expect(find.byType(DateRangePickerDialog), findsOneWidget);
-
});
}