Skip to content

Commit

Permalink
Fix regressive scroll bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qianlifeng committed Dec 11, 2023
1 parent 903d40a commit e2446e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions Wox.UI.Flutter/wox/lib/components/wox_preview_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ class WoxPreviewView extends StatelessWidget {
Widget contentWidget = const SizedBox();
if (woxPreview.previewType == WoxPreviewTypeEnum.WOX_PREVIEW_TYPE_MARKDOWN.code) {
var styleTheme = Theme.of(context).copyWith(
textTheme: Theme.of(context).textTheme.apply(
bodyColor: fromCssColor(woxTheme.previewFontColor),
displayColor: fromCssColor(woxTheme.previewFontColor),
));
textTheme: Theme.of(context).textTheme.apply(
bodyColor: fromCssColor(woxTheme.previewFontColor),
displayColor: fromCssColor(woxTheme.previewFontColor),
),
cardColor: Colors.transparent,
);
contentWidget = Markdown(
data: woxPreview.previewData,
padding: EdgeInsets.zero,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ class WoxLauncherController extends GetxController implements WoxLauncherInterfa

void _resetActiveResult() {
_activeResultIndex.value = 0;
resultListViewScrollController.jumpTo(0);
if (resultListViewScrollController.hasClients) {
resultListViewScrollController.jumpTo(0);
}

//reset preview
if (queryResults.isNotEmpty) {
Expand Down

0 comments on commit e2446e4

Please sign in to comment.