Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-12 20:02:20 +08:00
parent ba372a101b
commit 4de43faa2e
11 changed files with 86 additions and 59 deletions

View File

@@ -43,7 +43,7 @@ class BlackListController
..value.data!.removeAt(index)
..refresh();
total.value -= 1;
SmartDialog.showToast('操作成功');
SmartDialog.showToast('移除成功');
}
},
);

View File

@@ -239,7 +239,7 @@ mixin FavMixin on TripleMixin {
if (result.isSuccess) {
updateFavCount(hasFav ? -1 : 1);
this.hasFav.value = !hasFav;
SmartDialog.showToast('✅ 快速收藏/取消收藏成功');
SmartDialog.showToast('${hasFav ? '取消' : ''}收藏成功');
} else {
res.toast();
}
@@ -283,7 +283,7 @@ mixin FavMixin on TripleMixin {
updateFavCount(newVal ? 1 : -1);
hasFav.value = newVal;
}
SmartDialog.showToast('操作成功');
SmartDialog.showToast('${newVal ? '' : '取消'}收藏成功');
} else {
result.toast();
}

View File

@@ -56,7 +56,7 @@ abstract class CommonWhisperController<R>
if (res.isSuccess) {
item.isMuted = !isMuted;
loadingState.refresh();
SmartDialog.showToast('操作成功');
SmartDialog.showToast('设置成功');
} else {
res.toast();
}

View File

@@ -59,7 +59,7 @@ class _GroupPanelState extends State<GroupPanel> {
tags.isEmpty ? '0' : tags.join(','),
);
if (res.isSuccess) {
SmartDialog.showToast('操作成功');
SmartDialog.showToast('保存成功');
Get.back(result: tags);
} else {
res.toast();

View File

@@ -148,7 +148,7 @@ class LaterController extends MultiSelectController<LaterData, LaterItemModel>
Get.find<LaterController>(tag: item.type.toString()).onReload();
} catch (_) {}
}
SmartDialog.showToast('操作成功');
SmartDialog.showToast('已清空');
} else {
res.toast();
}

View File

@@ -393,7 +393,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent,
appBar: _buildAppBar(isFullScreen),
appBar: isFullScreen && !isPortrait
? null
: _buildAppBar(isFullScreen),
body: isPortrait
? Obx(
() {
@@ -412,7 +414,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
Widget _buildPH(bool isFullScreen) {
final height = maxWidth / Style.aspectRatio16x9;
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
final videoHeight = isFullScreen
? maxHeight - (isPortrait ? padding.top : 0)
: height;
final bottomHeight = maxHeight - padding.top - height - kToolbarHeight;
return Column(
children: [
@@ -440,7 +444,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
Widget _buildPP(bool isFullScreen) {
final bottomHeight = 70 + padding.bottom;
final videoHeight = isFullScreen
? maxHeight - padding.top
? maxHeight - (isPortrait ? padding.top : 0)
: maxHeight - bottomHeight;
return Stack(
clipBehavior: Clip.none,
@@ -655,7 +659,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
videoWidth = maxWidth - rightWidth - padding.horizontal;
final videoHeight = maxHeight - padding.top - kToolbarHeight;
final width = isFullScreen ? maxWidth : videoWidth;
final height = isFullScreen ? maxHeight - padding.top : videoHeight;
final height = isFullScreen
? maxHeight - (isPortrait ? padding.top : 0)
: videoHeight;
return Padding(
padding: isFullScreen
? EdgeInsets.zero

View File

@@ -92,7 +92,7 @@ class LikeMeController
if (res.isSuccess) {
item.noticeState = noticeState;
loadingState.refresh();
SmartDialog.showToast('操作成功');
SmartDialog.showToast('设置成功');
} else {
res.toast();
}

View File

@@ -515,13 +515,17 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
final isFullScreen = this.isFullScreen;
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: PreferredSize(
appBar: isFullScreen && !isPortrait
? null
: PreferredSize(
preferredSize: const Size.fromHeight(0),
child: Obx(
() {
final scrollRatio = videoDetailController.scrollRatio.value;
final scrollRatio =
videoDetailController.scrollRatio.value;
final flag =
isPortrait && videoDetailController.scrollCtr.offset != 0;
isPortrait &&
videoDetailController.scrollCtr.offset != 0;
return AppBar(
backgroundColor: flag && scrollRatio > 0
? Color.lerp(
@@ -533,7 +537,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
toolbarHeight: 0,
systemOverlayStyle: Platform.isAndroid
? SystemUiOverlayStyle(
statusBarIconBrightness: flag && scrollRatio >= 0.5
statusBarIconBrightness:
flag && scrollRatio >= 0.5
? themeData.brightness.reverse
: Brightness.light,
systemNavigationBarIconBrightness:
@@ -550,7 +555,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
onlyOneScrollInBody: true,
pinnedHeaderSliverHeightBuilder: () {
double pinnedHeight = this.isFullScreen || !isPortrait
? maxHeight - padding.top
? maxHeight - (isPortrait ? padding.top : 0)
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
@@ -576,7 +581,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
},
headerSliverBuilder: (context, innerBoxIsScrolled) {
final height = isFullScreen || !isPortrait
? maxHeight - padding.top
? maxHeight - (isPortrait ? padding.top : 0)
: videoDetailController.isExpanding ||
videoDetailController.isCollapsing
? animHeight
@@ -812,7 +817,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
final isFullScreen = this.isFullScreen;
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
appBar: isFullScreen && !isPortrait
? null
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
body: Padding(
padding: !isFullScreen
? padding.copyWith(top: 0, bottom: 0)
@@ -945,7 +952,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
}
final videoWidth = isFullScreen ? maxWidth : width;
final double height = width / Style.aspectRatio16x9;
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
final videoHeight = isFullScreen
? maxHeight - (isPortrait ? padding.top : 0)
: height;
if (height > maxHeight) {
return childSplit(Style.aspectRatio16x9);
}
@@ -1038,7 +1047,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
final isFullScreen = this.isFullScreen;
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
appBar: isFullScreen && !isPortrait
? null
: AppBar(backgroundColor: Colors.black, toolbarHeight: 0),
body: Padding(
padding: !isFullScreen
? padding.copyWith(top: 0, bottom: 0)
@@ -1061,7 +1072,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
}
final shouldShowSeasonPanel = _shouldShowSeasonPanel;
final double height = maxHeight / 2.5;
final videoHeight = isFullScreen ? maxHeight - padding.top : height;
final videoHeight = isFullScreen
? maxHeight - (isPortrait ? padding.top : 0)
: height;
final bottomHeight = maxHeight - height - padding.top;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -1514,6 +1527,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
Obx(() {
if (!videoDetailController.autoPlay) {
return Positioned.fill(
bottom: -1,
child: GestureDetector(
onTap: handlePlay,
behavior: .opaque,

View File

@@ -538,19 +538,21 @@ class PlPlayerController with BlockConfigMixin {
case .portraitUp:
if (!_isVertical && controlsLock.value) return;
if (!horizontalScreen && !_isVertical && isFullScreen) {
if (!isManualFS) {
triggerFullScreen(status: false, orientation: orientation);
}
} else {
portraitUpMode();
}
case .landscapeLeft:
if (!horizontalScreen && !isFullScreen) {
triggerFullScreen(orientation: orientation);
triggerFullScreen(orientation: orientation, isManualFS: false);
} else {
landscapeLeftMode();
}
case .landscapeRight:
if (!horizontalScreen && !isFullScreen) {
triggerFullScreen(orientation: orientation);
triggerFullScreen(orientation: orientation, isManualFS: false);
} else {
landscapeRightMode();
}
@@ -1413,6 +1415,7 @@ class PlPlayerController with BlockConfigMixin {
}
double screenRatio = 0.0;
bool isManualFS = true;
late final FullScreenMode mode = Pref.fullScreenMode;
late final horizontalScreen = Pref.horizontalScreen;
@@ -1422,6 +1425,7 @@ class PlPlayerController with BlockConfigMixin {
bool status = true,
bool inAppFullScreen = false,
DeviceOrientation? orientation,
bool isManualFS = true,
}) async {
if (isDesktopPip) return;
if (isFullScreen.value == status) return;
@@ -1429,6 +1433,7 @@ class PlPlayerController with BlockConfigMixin {
if (_fsProcessing) return;
_fsProcessing = true;
toggleFullScreen(status);
this.isManualFS = isManualFS;
try {
if (status) {
if (PlatformUtils.isMobile) {

View File

@@ -190,13 +190,15 @@ abstract final class Pref {
defaultValue: UpPanelPosition.leftFixed.index,
)];
static FullScreenMode get fullScreenMode =>
FullScreenMode.values[_setting.get(
SettingBoxKey.fullScreenMode,
defaultValue: horizontalScreen
? FullScreenMode.none.index
: FullScreenMode.auto.index,
)];
static FullScreenMode get fullScreenMode {
int? index = _setting.get(SettingBoxKey.fullScreenMode);
if (index == null) {
final FullScreenMode mode = horizontalScreen && isTablet ? .none : .auto;
_setting.put(SettingBoxKey.fullScreenMode, mode.index);
return mode;
}
return FullScreenMode.values[index];
}
static BtmProgressBehavior get btmProgressBehavior =>
BtmProgressBehavior.values[_setting.get(

View File

@@ -219,9 +219,9 @@ Win32Window::MessageHandler(HWND hwnd,
}
return 0;
case WM_DWMCOLORIZATIONCOLORCHANGED:
UpdateTheme(hwnd);
return 0;
// case WM_DWMCOLORIZATIONCOLORCHANGED:
// UpdateTheme(hwnd);
// return 0;
}
return DefWindowProc(window_handle_, message, wparam, lparam);