Skip to content

Commit

Permalink
fix: タブの位置を設定後すぐに反映されるように
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Dec 10, 2024
1 parent b01c83c commit 1b54538
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions lib/view/time_line_page/time_line_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ class TimeLinePageState extends ConsumerState<TimeLinePage> {
generalSettingsRepositoryProvider
.select((value) => value.settings.isDeckMode),
);
final tabPosition = ref.watch(
generalSettingsRepositoryProvider
.select((value) => value.settings.tabPosition),
);

if (deckMode) return const TimelineTablet();

timelineRepository = ref.watch(timelineProvider(currentTabSetting));
Expand All @@ -227,12 +232,7 @@ class TimeLinePageState extends ConsumerState<TimeLinePage> {
body: SafeArea(
child: Column(
children: [
if (ref
.read(generalSettingsRepositoryProvider)
.settings
.tabPosition ==
TabPosition.top)
buildAppbar(),
if (tabPosition == TabPosition.top) buildAppbar(),
Container(
decoration: BoxDecoration(
border: Border(
Expand Down Expand Up @@ -386,11 +386,7 @@ class TimeLinePageState extends ConsumerState<TimeLinePage> {
],
),
),
if (ref
.read(generalSettingsRepositoryProvider)
.settings
.tabPosition ==
TabPosition.bottom &&
if (tabPosition == TabPosition.bottom &&
!ref.watch(timelineFocusNode).hasFocus)
buildAppbar(),
],
Expand Down

0 comments on commit 1b54538

Please sign in to comment.