Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deprecatedなメンバを修正 #853

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 73 additions & 73 deletions app/ios/Podfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/lib/core/provider/app_lifecycle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AppLifecycleState appLifeCycle(AppLifeCycleRef ref) {
..listenSelf(
(previous, next) => ref
.read(talkerProvider)
.logTyped(AppLifeCycleLog('$previous -> $next')),
.logCustom(AppLifeCycleLog('$previous -> $next')),
);
return AppLifecycleState.resumed;
}
Expand Down
2 changes: 1 addition & 1 deletion app/lib/core/provider/ntp/ntp_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Ntp extends _$Ntp {

ref
.read(talkerProvider)
.logTyped(NtpLog('NTP Time Sync: offset ${offset}ms'));
.logCustom(NtpLog('NTP Time Sync: offset ${offset}ms'));
}

DateTime? now() {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/core/router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class _NavigatorObserver extends NavigatorObserver {
void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) {
if (route is PageRoute) {
final page = route.settings.name;
talker.logTyped(GoRouterLog('push to $page'));
talker.logCustom(GoRouterLog('push to $page'));
if (kIsWeb) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ class KmoniViewModel extends _$KmoniViewModel {
const Duration(seconds: 1),
(_) => _update(),
);
talker.logTyped(
talker.logCustom(
KmoniLog('遅延調整を行いました ${diff.inMicroseconds / 1000}ms'),
);
return diff;
}()
.timeout(const Duration(seconds: 5));
// ignore: avoid_catches_without_on_clauses
} catch (e) {
talker.logTyped(
talker.logCustom(
KmoniLog('遅延調整失敗 $e'),
);
state = state.copyWith(isDelayAdjusting: false);
Expand Down
28 changes: 2 additions & 26 deletions app/lib/feature/settings/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import 'package:feedback/feedback.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_email_sender/flutter_email_sender.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shorebird_code_push/shorebird_code_push.dart';
import 'package:url_launcher/url_launcher_string.dart';

class SettingsScreen extends ConsumerWidget {
Expand Down Expand Up @@ -150,30 +148,8 @@ class _AppVersionInformation extends HookConsumerWidget {
final theme = Theme.of(context);
final textTheme = theme.textTheme;

final patchInfoFuture = useMemoized(
() => (
ShorebirdCodePush().currentPatchNumber(),
ShorebirdCodePush().nextPatchNumber(),
).wait,
);
final patchInfo = useFuture(patchInfoFuture);

var text = 'EQMonitor v${packageInfo.version} '
'(${packageInfo.buildNumber}';
if (patchInfo.hasData) {
final currentPatch = patchInfo.data!.$1;
final nextPatch = patchInfo.data!.$2;
text += switch ((currentPatch, nextPatch)) {
(null, null) => ')',
(null, final int next) => '+$next)\n&'
'新しいパッチが利用可能です。2回アプリケーションを再起動して適用できます。',
(final int current, null) => '+$current)',
(final int current, final int next) => '+$current->$next)\n'
'新しいパッチが利用可能です。2回アプリケーションを再起動して適用できます。',
};
} else {
text += ')';
}
final text = 'EQMonitor v${packageInfo.version} '
'(${packageInfo.buildNumber})';

return Center(
child: Padding(
Expand Down
Loading
Loading