mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 12:38:34 +00:00
fix menu position
fix sc opt ui Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -527,9 +527,11 @@ class LiveRoomController extends GetxController {
|
||||
} else {
|
||||
bool? refresh;
|
||||
for (final id in ids) {
|
||||
final item = superChatMsg.firstWhereOrNull((e) => e.id == id);
|
||||
item?.deleted = true;
|
||||
refresh ??= true;
|
||||
if (superChatMsg.firstWhereOrNull((e) => e.id == id)
|
||||
case final item?) {
|
||||
item.deleted = true;
|
||||
refresh ??= true;
|
||||
}
|
||||
}
|
||||
if (refresh ?? false) {
|
||||
superChatMsg.refresh();
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_superchat/item.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -93,7 +94,7 @@ class _SuperChatCardState extends State<SuperChatCard> {
|
||||
}
|
||||
showMenu(
|
||||
context: context,
|
||||
position: RelativeRect.fromLTRB(offset.dx, offset.dy, offset.dx, 0),
|
||||
position: PageUtils.menuPosition(offset),
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
height: 38,
|
||||
@@ -200,7 +201,7 @@ class _SuperChatCardState extends State<SuperChatCard> {
|
||||
item.message,
|
||||
style: TextStyle(
|
||||
color: Utils.parseColor(item.messageFontColor),
|
||||
decoration: !widget.persistentSC && item.deleted
|
||||
decoration: widget.persistentSC && item.deleted
|
||||
? .lineThrough
|
||||
: null,
|
||||
decorationThickness: 1.5,
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:PiliPlus/pages/live_room/superchat/superchat_card.dart';
|
||||
import 'package:PiliPlus/pages/video/widgets/header_control.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/gestures.dart';
|
||||
@@ -294,9 +295,11 @@ class LiveRoomChatPanel extends StatelessWidget {
|
||||
TapUpDetails details,
|
||||
DanmakuMsg item,
|
||||
) {
|
||||
final dx = details.globalPosition.dx;
|
||||
final uiScale = Pref.uiScale;
|
||||
final dx = details.globalPosition.dx / uiScale;
|
||||
final renderBox = itemContext.findRenderObject() as RenderBox;
|
||||
final dy = renderBox.localToGlobal(renderBox.size.bottomLeft(.zero)).dy;
|
||||
final dy =
|
||||
renderBox.localToGlobal(renderBox.size.bottomLeft(.zero)).dy / uiScale;
|
||||
final autoScroll =
|
||||
liveRoomController.autoScroll &&
|
||||
!liveRoomController.disableAutoScroll.value;
|
||||
|
||||
Reference in New Issue
Block a user