2024-12-13 11:26:34 +01:00

23 lines
538 B
Swift

import Foundation
final class PostSettings: ObservableObject {
/// The number of posts to show in a single page of the news feed
@Published
var postsPerPage: Int
/// The maximum width of the main content
@Published
var contentWidth: Int
init(postsPerPage: Int, contentWidth: Int) {
self.postsPerPage = postsPerPage
self.contentWidth = contentWidth
}
init(file: PostSettingsFile) {
self.postsPerPage = file.postsPerPage
self.contentWidth = file.contentWidth
}
}