This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct TestProjectApp: App { | |
var appState = AppState() | |
@Environment(\.scenePhase) var scenePhase | |
var body: some Scene { | |
WindowGroup { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import CoreData | |
struct PostEditView: View { | |
@ObservedObject var post: Post | |
@Environment(\.managedObjectContext) var moc | |
@State var hasChanges: Bool = false | |
var body: some View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
class ViewModel: ObservableObject { | |
var downloadURL = URL(string: "https://i.redd.it/dwlyzl73nv071.jpg")! | |
@Published var downsampledImage: Image? | |
func downloadResourceToURL(optimize: Bool, width: CGFloat) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView+Appearance.h | |
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UITableView (Appearance)<UIAppearance> | |
@property (nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView+Appearance.h | |
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UITableView (Appearance)<UIAppearance> | |
@property (nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView+Appearance.h | |
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UITableView (Appearance)<UIAppearance> | |
@property (nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView+Appearance.h | |
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UITableView (Appearance)<UIAppearance> | |
@property (nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView+Appearance.h | |
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@interface UITableView (Appearance)<UIAppearance> | |
@property (nonatomic, assign) CGFloat footerViewHeight UI_APPEARANCE_SELECTOR; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<CBL_FMDatabase: 0x7fd8b2c26880> executeQuery: SELECT sequence, revid, deleted FROM revs WHERE doc_id=? AND current ORDER BY sequence DESC | |
obj: 5887 | |
>>>>>>>>>>>>>>>>>>>>>>>>> 7 total Conflicts for: f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 | |
<CBL_FMDatabase: 0x7fd8b2c26880> executeUpdate: SAVEPOINT cbl_1 | |
14:15:00.826| CBLDatabase: Begin transaction (level 1)... | |
14:15:00.826| CBLDatabase: PUT rev={f8ee7974-9558-4ba4-ba94-6a7ce98c58b4 #(null) DEL}, prevRevID=114-b119801ccce39c63560dd7a3576a38ea, allowConflict=0 | |
<CBL_FMDatabase: 0x7fd8b2c26880> executeUpdate: SAVEPOINT cbl_2 | |
14:15:00.827| CBLDatabase: Begin transaction (level 2)... | |
<CBL_FMDatabase: 0x7fd8b2c26880> executeQuery: SELECT revid, deleted FROM revs WHERE doc_id=? and current=1 ORDER BY deleted asc, revid desc LIMIT 2 | |
obj: 5887 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CheckoutsController.class_eval do | |
# customized verison of the standard r_c update method (since we need to handle gateway errors, etc) | |
def update | |
load_object | |
# call the edit hooks for the current step in case we experience validation failure and need to edit again | |
edit_hooks | |
@checkout.enable_validation_group(@checkout.state.to_sym) | |
@prev_state = @checkout.state |
NewerOlder