mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -145,15 +145,14 @@ class MyApp extends StatelessWidget {
|
||||
FlutterDisplayMode.supported.then((value) {
|
||||
modes = value;
|
||||
var storageDisplay = GStorage.setting.get(SettingBoxKey.displayMode);
|
||||
DisplayMode f = DisplayMode.auto;
|
||||
DisplayMode? displayMode;
|
||||
if (storageDisplay != null) {
|
||||
f = modes.firstWhere(
|
||||
displayMode = modes.firstWhereOrNull(
|
||||
(e) => e.toString() == storageDisplay,
|
||||
orElse: () => f,
|
||||
);
|
||||
}
|
||||
DisplayMode preferred = modes.toList().firstWhere((el) => el == f);
|
||||
FlutterDisplayMode.setPreferredMode(preferred);
|
||||
displayMode ??= DisplayMode.auto;
|
||||
FlutterDisplayMode.setPreferredMode(displayMode);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -256,5 +256,5 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
|
||||
enablePublish.value = value.trim().isNotEmpty;
|
||||
}
|
||||
|
||||
void onSave() {}
|
||||
void onSave();
|
||||
}
|
||||
|
||||
@@ -228,12 +228,13 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
|
||||
"biz_id": "",
|
||||
});
|
||||
case RichTextType.vote:
|
||||
list.add({
|
||||
list
|
||||
..add({
|
||||
"raw_text": e.rawText,
|
||||
"type": 4,
|
||||
"biz_id": e.id,
|
||||
});
|
||||
list.add({
|
||||
})
|
||||
..add({
|
||||
"raw_text": ' ',
|
||||
"type": 1,
|
||||
"biz_id": "",
|
||||
@@ -243,7 +244,7 @@ abstract class CommonRichTextPubPageState<T extends CommonRichTextPubPage>
|
||||
return list;
|
||||
}
|
||||
|
||||
double _mentionOffset = 0;
|
||||
late double _mentionOffset = 0;
|
||||
Future<void> onMention([bool fromClick = false]) async {
|
||||
controller.keepChatPanel();
|
||||
final res = await DynMentionPanel.onDynMention(
|
||||
|
||||
@@ -113,14 +113,18 @@ class LiveRoomController extends GetxController {
|
||||
acceptQnList = item.acceptQn!.map((e) {
|
||||
return (
|
||||
code: e,
|
||||
desc: LiveQuality.values
|
||||
.firstWhere((element) => element.code == e)
|
||||
.description,
|
||||
desc:
|
||||
LiveQuality.values
|
||||
.firstWhereOrNull((element) => element.code == e)
|
||||
?.description ??
|
||||
e.toString(),
|
||||
);
|
||||
}).toList();
|
||||
currentQnDesc.value = LiveQuality.values
|
||||
.firstWhere((element) => element.code == currentQn)
|
||||
.description;
|
||||
currentQnDesc.value =
|
||||
LiveQuality.values
|
||||
.firstWhereOrNull((element) => element.code == currentQn)
|
||||
?.description ??
|
||||
currentQn.toString();
|
||||
String videoUrl = VideoUtils.getCdnUrl(item);
|
||||
await playerInit(videoUrl);
|
||||
isLoaded.value = true;
|
||||
@@ -251,9 +255,11 @@ class LiveRoomController extends GetxController {
|
||||
return null;
|
||||
}
|
||||
currentQn = qn;
|
||||
currentQnDesc.value = LiveQuality.values
|
||||
.firstWhere((element) => element.code == currentQn)
|
||||
.description;
|
||||
currentQnDesc.value =
|
||||
LiveQuality.values
|
||||
.firstWhereOrNull((element) => element.code == currentQn)
|
||||
?.description ??
|
||||
currentQn.toString();
|
||||
return queryLiveUrl();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class _SetDisplayModeState extends State<SetDisplayMode> {
|
||||
preferred ??= DisplayMode.auto;
|
||||
|
||||
FlutterDisplayMode.setPreferredMode(preferred!).whenComplete(() {
|
||||
Future.delayed(const Duration(milliseconds: 100)).whenComplete(fetchAll);
|
||||
Future.delayed(const Duration(milliseconds: 100), fetchAll);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -551,13 +551,15 @@ class PageUtils {
|
||||
initIndex: index,
|
||||
setStatusBar: false,
|
||||
onClose: (value) async {
|
||||
if (value == false) {
|
||||
if (!value) {
|
||||
try {
|
||||
await ctr.reverse();
|
||||
} catch (_) {}
|
||||
}
|
||||
try {
|
||||
ctr.dispose();
|
||||
} catch (_) {}
|
||||
if (value == false) {
|
||||
if (!value) {
|
||||
Get.back();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user