diff --git a/Yep/AppDelegate.swift b/Yep/AppDelegate.swift index e76210de..5d60139e 100644 --- a/Yep/AppDelegate.swift +++ b/Yep/AppDelegate.swift @@ -40,7 +40,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(YepConfig.appGroupID)! let realmPath = directory.URLByAppendingPathComponent("db.realm").path! - return Realm.Configuration(path: realmPath, schemaVersion: 1, migrationBlock: { migration, oldSchemaVersion in + return Realm.Configuration(path: realmPath, schemaVersion: 2, migrationBlock: { migration, oldSchemaVersion in }) } diff --git a/Yep/ViewControllers/Conversation/ConversationViewController.swift b/Yep/ViewControllers/Conversation/ConversationViewController.swift index 3cc3b25a..8574a441 100644 --- a/Yep/ViewControllers/Conversation/ConversationViewController.swift +++ b/Yep/ViewControllers/Conversation/ConversationViewController.swift @@ -1164,11 +1164,17 @@ class ConversationViewController: BaseViewController { feedView.feed = feed feedView.foldAction = { [weak self] in - self?.conversationCollectionView.contentInset.top = 64 + FeedView.foldHeight + conversationCollectionViewContentInsetYOffset + + if let strongSelf = self { + + self?.conversationCollectionView.contentInset.top = 64 + FeedView.foldHeight + strongSelf.conversationCollectionViewContentInsetYOffset + } } feedView.unfoldAction = { [weak self] feedView in - self?.conversationCollectionView.contentInset.top = 64 + feedView.normalHeight + conversationCollectionViewContentInsetYOffset + if let strongSelf = self { + self?.conversationCollectionView.contentInset.top = 64 + feedView.normalHeight + strongSelf.conversationCollectionViewContentInsetYOffset + } } //feedView.backgroundColor = UIColor.orangeColor()