mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 私信页面表情面板 issues #588
This commit is contained in:
@@ -109,9 +109,10 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
@override
|
@override
|
||||||
void didChangeMetrics() {
|
void didChangeMetrics() {
|
||||||
super.didChangeMetrics();
|
super.didChangeMetrics();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
final String routePath = Get.currentRoute;
|
||||||
// 键盘高度
|
if (mounted && routePath.startsWith('/video')) {
|
||||||
if (mounted) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
// 键盘高度
|
||||||
final viewInsets = EdgeInsets.fromViewPadding(
|
final viewInsets = EdgeInsets.fromViewPadding(
|
||||||
View.of(context).viewInsets, View.of(context).devicePixelRatio);
|
View.of(context).viewInsets, View.of(context).devicePixelRatio);
|
||||||
_debouncer.run(() {
|
_debouncer.run(() {
|
||||||
@@ -124,8 +125,8 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -139,6 +140,9 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double keyboardHeight = EdgeInsets.fromViewPadding(
|
||||||
|
View.of(context).viewInsets, View.of(context).devicePixelRatio)
|
||||||
|
.bottom;
|
||||||
return Container(
|
return Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
@@ -51,27 +51,31 @@ class _WhisperDetailPageState extends State<WhisperDetailPage>
|
|||||||
@override
|
@override
|
||||||
void didChangeMetrics() {
|
void didChangeMetrics() {
|
||||||
super.didChangeMetrics();
|
super.didChangeMetrics();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
final String routePath = Get.currentRoute;
|
||||||
// 键盘高度
|
if (mounted && routePath.startsWith('/whisper_detail')) {
|
||||||
final viewInsets = EdgeInsets.fromViewPadding(
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
View.of(context).viewInsets, View.of(context).devicePixelRatio);
|
// 键盘高度
|
||||||
_debouncer.run(() {
|
final viewInsets = EdgeInsets.fromViewPadding(
|
||||||
if (mounted) {
|
View.of(context).viewInsets, View.of(context).devicePixelRatio);
|
||||||
if (keyboardHeight == 0) {
|
_debouncer.run(() {
|
||||||
setState(() {
|
if (mounted) {
|
||||||
emoteHeight = keyboardHeight =
|
if (keyboardHeight == 0) {
|
||||||
keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight;
|
setState(() {
|
||||||
});
|
emoteHeight = keyboardHeight =
|
||||||
|
keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
replyContentFocusNode.removeListener(() {});
|
replyContentFocusNode.removeListener(() {});
|
||||||
|
replyContentFocusNode.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user