Skip to content

Commit

Permalink
Merge tag '1.2' into develop
Browse files Browse the repository at this point in the history
no message
  • Loading branch information
RealBonus committed Nov 19, 2018
2 parents 6718285 + f6a8688 commit e4be87a
Show file tree
Hide file tree
Showing 116 changed files with 3,539 additions and 851 deletions.
150 changes: 82 additions & 68 deletions Adamant.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

42 changes: 30 additions & 12 deletions Adamant/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ extension StoreKey {

// MARK: - Resources
struct AdamantResources {
static let coreDataModel = Bundle.main.url(forResource: "ChatModels", withExtension: "momd")!
static let coreDataModel = Bundle.main.url(forResource: "Adamant", withExtension: "momd")!

static let nodes: [Node] = [
Node(scheme: .https, host: "endless.adamant.im", port: nil),
Node(scheme: .https, host: "clown.adamant.im", port: nil),
Node(scheme: .https, host: "lake.adamant.im", port: nil),
Node(scheme: .https, host: "endless.adamant.im", port: nil),
Node(scheme: .https, host: "clown.adamant.im", port: nil),
Node(scheme: .https, host: "lake.adamant.im", port: nil),
// Node(scheme: .http, host: "80.211.177.181", port: nil), // Bugged one
// Node(scheme: .http, host: "163.172.183.198", port: nil) // Testnet
// Node(scheme: .http, host: "163.172.132.38", port: 36667) // Testnet
]

static let ethServers = [
// "https://ethnode1.adamant.im/"
"https://ropsten.infura.io/" // test network
"https://ethnode1.adamant.im/"
// "https://ropsten.infura.io/" // test network
]

// Addresses
Expand All @@ -69,8 +69,8 @@ struct AdamantResources {

// Explorers
static let adamantExplorerAddress = "https://explorer.adamant.im/tx/"
// static let ethereumExplorerAddress = "https://etherscan.io/tx/"
static let ethereumExplorerAddress = "https://ropsten.etherscan.io/tx/" // Testnet
static let ethereumExplorerAddress = "https://etherscan.io/tx/"
// static let ethereumExplorerAddress = "https://ropsten.etherscan.io/tx/" // Testnet

private init() {}
}
Expand Down Expand Up @@ -210,7 +210,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

// MARK: 7. Welcome messages
NotificationCenter.default.addObserver(forName: Notification.Name.AdamantChatsProvider.initialSyncFinished, object: nil, queue: OperationQueue.main, using: handleWelcomeMessages)
NotificationCenter.default.addObserver(forName: Notification.Name.AdamantChatsProvider.initiallySyncedChanged, object: nil, queue: OperationQueue.main, using: handleWelcomeMessages)

return true
}
Expand Down Expand Up @@ -388,6 +388,10 @@ extension AppDelegate {
// MARK: - Welcome messages
extension AppDelegate {
private func handleWelcomeMessages(notification: Notification) {
guard let synced = notification.userInfo?[AdamantUserInfoKey.ChatProvider.initiallySynced] as? Bool, synced else {
return
}

guard let stack = container.resolve(CoreDataStack.self), let chatProvider = container.resolve(ChatsProvider.self) else {
fatalError("Whoa...")
}
Expand All @@ -407,7 +411,14 @@ extension AppDelegate {
date: Date.adamantNullDate,
unread: unread,
silent: welcome.silentNotification,
completion: { _ in })
showsChatroom: true,
completion: { result in
guard case let .failure(error) = result else {
return
}

print("ERROR showing welcome message: \(error.message)")
})
}

if let ico = AdamantContacts.adamantIco.messages["chats.ico_message"] {
Expand All @@ -416,7 +427,14 @@ extension AppDelegate {
date: Date.adamantNullDate,
unread: unread,
silent: ico.silentNotification,
completion: { _ in })
showsChatroom: true,
completion: { result in
guard case let .failure(error) = result else {
return
}

print("ERROR showing welcome message: \(error.message)")
})
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Attachment.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "SendMoney.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "row_Notifications.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
"images" : [
{
"idiom" : "universal",
"filename" : "attachment.png",
"filename" : "row_QR.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "attachment@2x.png",
"filename" : "row_QR@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "attachment@3x.png",
"filename" : "row_QR@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "row_faceid.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "row_touchid.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e4be87a

Please sign in to comment.