mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-16 22:24:04 +08:00
tweaks (#2100)
* mod: pgc episode title * opt: ColorScheme.of * mod: mpv api version * opt: log handler * opt: ext
This commit is contained in:
committed by
GitHub
parent
24769e144f
commit
b33fdf14af
@@ -1,6 +1,6 @@
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart' show PlatformException;
|
||||
|
||||
@@ -53,7 +53,7 @@ class _LogsPageState extends State<LogsPage> {
|
||||
logsContent = (await logsPath.readAsLines()).reversed.map((i) {
|
||||
try {
|
||||
final log = Report.fromJson(jsonDecode(i));
|
||||
latestLog ??= log.copyWith();
|
||||
latestLog ??= log;
|
||||
return log;
|
||||
} catch (e, s) {
|
||||
return Report(
|
||||
@@ -464,30 +464,7 @@ class Report extends catcher.Report {
|
||||
null,
|
||||
);
|
||||
|
||||
Report copyWith({
|
||||
dynamic error,
|
||||
dynamic stackTrace,
|
||||
DateTime? dateTime,
|
||||
Map<String, dynamic>? deviceParameters,
|
||||
Map<String, dynamic>? applicationParameters,
|
||||
Map<String, dynamic>? customParameters,
|
||||
FlutterErrorDetails? errorDetails,
|
||||
PlatformType? platformType,
|
||||
}) {
|
||||
return Report(
|
||||
error ?? this.error,
|
||||
stackTrace ?? this.stackTrace,
|
||||
dateTime ?? this.dateTime,
|
||||
deviceParameters ?? this.deviceParameters,
|
||||
applicationParameters ?? this.applicationParameters,
|
||||
customParameters ?? this.customParameters,
|
||||
errorDetails ?? this.errorDetails,
|
||||
platformType ?? this.platformType,
|
||||
null,
|
||||
);
|
||||
}
|
||||
|
||||
String _params2String(Map<String, dynamic> params) {
|
||||
static String _params2String(Map<String, dynamic> params) {
|
||||
return params.entries
|
||||
.map((entry) => '${entry.key}: ${entry.value}\n')
|
||||
.join();
|
||||
|
||||
Reference in New Issue
Block a user