Skip to content

Commit 7256895

Browse files
graycreateclaude
andcommitted
fix: resolve TabBar compilation errors
- Changed TabbarClickAction.selectedTab from let to var with default value - Added TabbarClickAction as following action after successful feed data fetch - This fixes the compilation errors in TabBar.swift 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1231b29 commit 7256895

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

V2er/State/DataFlow/Actions/GlobalActions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protocol InstanceIdentifiable {
3131
struct TabbarClickAction: Action {
3232
var target: Reducer = R
3333

34-
let selectedTab: TabId
34+
var selectedTab: TabId = .feed
3535
}
3636

3737
struct ShowToastAction: Action {

V2er/State/DataFlow/Reducers/FeedReducer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func feedStateReducer(_ state: FeedState, _ action: Action) -> (FeedState, Actio
2525
state.willLoadPage = 1
2626
let supportsLoadMore = state.selectedTab.supportsLoadMore()
2727
state.hasMoreData = supportsLoadMore
28+
followingAction = TabbarClickAction();
2829
} else { }
2930
case let action as FeedActions.LoadMore.Start:
3031
guard !state.refreshing else { break }

0 commit comments

Comments
 (0)