mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
fix vote
fix filter dyn Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -917,7 +917,7 @@ class RichTextEditingController extends TextEditingController {
|
|||||||
}
|
}
|
||||||
if (offset > range.start && offset < range.end) {
|
if (offset > range.start && offset < range.end) {
|
||||||
if (e.isRich) {
|
if (e.isRich) {
|
||||||
if (offset < value.selection.baseOffset) {
|
if (offset < selection.baseOffset) {
|
||||||
return newSelection.copyWith(
|
return newSelection.copyWith(
|
||||||
baseOffset: range.start, extentOffset: range.start);
|
baseOffset: range.start, extentOffset: range.start);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ class DynamicsDataModel {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (enableFilter &&
|
if (enableFilter &&
|
||||||
banWordForDyn.hasMatch(
|
banWordForDyn.hasMatch((item.orig?.modules.moduleDynamic?.major
|
||||||
item.orig?.modules.moduleDynamic?.major?.opus?.summary?.text ??
|
?.opus?.summary?.text ??
|
||||||
item.modules.moduleDynamic?.major?.opus?.summary?.text ??
|
'') +
|
||||||
item.orig?.modules.moduleDynamic?.desc?.text ??
|
(item.modules.moduleDynamic?.major?.opus?.summary?.text ?? '') +
|
||||||
item.modules.moduleDynamic?.desc?.text ??
|
(item.orig?.modules.moduleDynamic?.desc?.text ?? '') +
|
||||||
'')) {
|
(item.modules.moduleDynamic?.desc?.text ?? ''))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (filterBan &&
|
if (filterBan &&
|
||||||
|
|||||||
@@ -91,28 +91,30 @@ class _VotePanelState extends State<VotePanel> {
|
|||||||
if (_enabled)
|
if (_enabled)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 16),
|
padding: const EdgeInsets.only(top: 16),
|
||||||
child: OutlinedButton(
|
child: Obx(
|
||||||
onPressed: groupValue.isNotEmpty
|
() => OutlinedButton(
|
||||||
? () async {
|
onPressed: groupValue.isNotEmpty
|
||||||
final res = await widget.callback(
|
? () async {
|
||||||
groupValue,
|
final res = await widget.callback(
|
||||||
anonymity,
|
groupValue,
|
||||||
);
|
anonymity,
|
||||||
if (res.isSuccess) {
|
);
|
||||||
if (mounted) {
|
if (res.isSuccess) {
|
||||||
setState(() {
|
if (mounted) {
|
||||||
_enabled = false;
|
setState(() {
|
||||||
_showPercentage = true;
|
_enabled = false;
|
||||||
_voteInfo = res.data;
|
_showPercentage = true;
|
||||||
_percentage = _cnt2Percentage(_voteInfo.options);
|
_voteInfo = res.data;
|
||||||
});
|
_percentage = _cnt2Percentage(_voteInfo.options);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.toast();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
res.toast();
|
|
||||||
}
|
}
|
||||||
}
|
: null,
|
||||||
: null,
|
child: const Center(child: Text('投票')),
|
||||||
child: const Center(child: Text('投票')),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user