Skip to content

Commit

Permalink
page should start with 1
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangerhards authored Feb 14, 2024
1 parent 6da6c62 commit 974df52
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/FeedListKit/FeedNetworking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import SwiftUI
public var loadMoreAtRowIndex: Int { 2 }

/// This var stores the current page
public var page: Int = 0
public var page: Int = 1

/// This var indicates wether the first fetch is done.
/// If this var is `true`, the first fetch is not done
Expand Down Expand Up @@ -64,7 +64,7 @@ import SwiftUI
}

if resetPage {
page = 0
page = 1
}

isFetching = true
Expand Down Expand Up @@ -115,7 +115,7 @@ import SwiftUI
}

if resetPage {
page = 0
page = 1
}

isFetching = true
Expand Down Expand Up @@ -189,7 +189,7 @@ import SwiftUI
fetchMoreFinished(animated: animated)
}

/// This method refreshes and resets the rows to page `0`
/// This method refreshes and resets the rows to page `1`
/// - Parameters:
/// - animated: Should the result variables be animated?, default is `true`
/// - callback: The callback
Expand All @@ -207,7 +207,7 @@ import SwiftUI
isRefreshing = true
}

page = 0
page = 1

fetch(animated: animated, arrayMutation: .replace) {
callback()
Expand All @@ -233,7 +233,7 @@ import SwiftUI
isRefreshing = true
}

page = 0
page = 1

await fetch(animated: animated, arrayMutation: .replace)
refreshFinished(animated: animated)
Expand Down

0 comments on commit 974df52

Please sign in to comment.