mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
360c9545f4
Requires https://github.com/toeverything/AFFiNE/pull/13606 to be merged. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Introduced an in-app Paywall with Pro, AI, and Believer plans, feature previews, paging dots, and selectable pricing options. - Added purchase and restore actions, plus a unified, polished UI using new color/icon resources. - Documentation - Added Swift Code Style Guidelines. - Chores - Updated dependencies (including MarkdownView 3.4.2), added new resource packages, and removed an unused dependency. - Raised iOS deployment target to 16.5 and refreshed project settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
22 lines
415 B
Swift
22 lines
415 B
Swift
//
|
|
// Tools.swift
|
|
// AFFiNE
|
|
//
|
|
// Created by qaq on 9/18/25.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension Optional {
|
|
func get(_ failure: String? = nil) throws -> Wrapped {
|
|
guard let self else {
|
|
if let failure {
|
|
throw NSError(domain: #function, code: -1, userInfo: [NSLocalizedDescriptionKey: failure])
|
|
} else {
|
|
throw NSError(domain: #function, code: -1)
|
|
}
|
|
}
|
|
return self
|
|
}
|
|
}
|