diff --git a/Antidote.xcodeproj/project.pbxproj b/Antidote.xcodeproj/project.pbxproj index 0803a99..601d748 100644 --- a/Antidote.xcodeproj/project.pbxproj +++ b/Antidote.xcodeproj/project.pbxproj @@ -576,8 +576,9 @@ AF2C929D279AB3F10094C08D /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF2C929C279AB3F10094C08D /* NotificationService.swift */; }; AF2C92A1279AB3F10094C08D /* pushextension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = AF2C929A279AB3F10094C08D /* pushextension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; AFA023F4274C069100FBFCC0 /* ConnectionStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA023F3274C069100FBFCC0 /* ConnectionStatus.swift */; }; - AFA024022753CC9000FBFCC0 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AFA024012753CC9000FBFCC0 /* GoogleService-Info.plist */; }; D4F896D05F7EAA7C321A2AA8 /* libPods-Antidote.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 034E57B3AE56E352BBAA0487 /* libPods-Antidote.a */; }; + F129B9C62B98C8E900AC7819 /* FAQ_en.html in Resources */ = {isa = PBXBuildFile; fileRef = F129B9C52B98C8E900AC7819 /* FAQ_en.html */; }; + F16BFEA72B98E0A800B65993 /* ChangeAppThemeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16BFEA62B98E0A800B65993 /* ChangeAppThemeController.swift */; }; F1D850AB2B8FD3D8000CE8FB /* dark-theme.yaml in Resources */ = {isa = PBXBuildFile; fileRef = F1D850AA2B8FD3D8000CE8FB /* dark-theme.yaml */; }; /* End PBXBuildFile section */ @@ -981,9 +982,10 @@ AF6AB24129156F1C00019362 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Localizable.strings; sourceTree = ""; }; AF6AB24229156F1E00019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/AppStoreLocalizable.strings"; sourceTree = ""; }; AFA023F3274C069100FBFCC0 /* ConnectionStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionStatus.swift; sourceTree = ""; }; - AFA024012753CC9000FBFCC0 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; B3C17AF8CE3B4AD1B68F2B5B /* Pods-Antidote.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Antidote.release.xcconfig"; path = "Pods/Target Support Files/Pods-Antidote/Pods-Antidote.release.xcconfig"; sourceTree = ""; }; CEC32120B965BE40E0029DB1 /* Pods-AntidoteTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AntidoteTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AntidoteTests/Pods-AntidoteTests.release.xcconfig"; sourceTree = ""; }; + F129B9C52B98C8E900AC7819 /* FAQ_en.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FAQ_en.html; sourceTree = ""; }; + F16BFEA62B98E0A800B65993 /* ChangeAppThemeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeAppThemeController.swift; sourceTree = ""; }; F1D850AA2B8FD3D8000CE8FB /* dark-theme.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = "dark-theme.yaml"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -1275,7 +1277,7 @@ 11771E341CA5C6D100EC259E /* Other */ = { isa = PBXGroup; children = ( - AFA024012753CC9000FBFCC0 /* GoogleService-Info.plist */, + F129B9C52B98C8E900AC7819 /* FAQ_en.html */, 11771E351CA5C6E900EC259E /* Reach.swift */, ); name = Other; @@ -1479,6 +1481,7 @@ 11B2535C1C4BACDB0068F47C /* TabBarController.swift */, 1193AB351C1DEF2E006AA9E5 /* TextEditController.swift */, 119AD1BD1BDED261000C5CB8 /* TextViewController.swift */, + F16BFEA62B98E0A800B65993 /* ChangeAppThemeController.swift */, ); name = Running; sourceTree = ""; @@ -1787,11 +1790,11 @@ 113E96421E4BB302000282FC /* AppStoreLocalizable.strings in Resources */, 11B253541C4AD9CF0068F47C /* isotoxin_RingtoneWhileCall.aac in Resources */, 11B253501C4AD9CF0068F47C /* isotoxin_Calltone.aac in Resources */, + F129B9C62B98C8E900AC7819 /* FAQ_en.html in Resources */, 11DDEAFD1D5FD9FE0000E2BE /* LaunchPlaceholderBoard.storyboard in Resources */, 11B253531C4AD9CF0068F47C /* isotoxin_Ringtone.aac in Resources */, 9C7475BE1BC698110098B1A4 /* Localizable.strings in Resources */, 9CEA6A1F1D957EFC0045F000 /* antidote-acknowledgements.html in Resources */, - AFA024022753CC9000FBFCC0 /* GoogleService-Info.plist in Resources */, 1173F0721BC5D9DA00B88B7B /* default-theme.yaml in Resources */, 116634CF1C70E46C0072C980 /* Launch Screen.storyboard in Resources */, 1131D6C51CA9D8BC00B4531C /* import-profile.html in Resources */, @@ -1831,13 +1834,13 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ScreenshotsUITests/Pods-ScreenshotsUITests-resources.sh", - "${PODS_ROOT}/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/Mute/Mute.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/SDCAlertView/SDCAlertView.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/objcTox/objcTox.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/JGProgressHUD Resources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Mute.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SDCAlertView.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/objcTox.bundle", ); @@ -1907,13 +1910,13 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-AntidoteTests/Pods-AntidoteTests-resources.sh", - "${PODS_ROOT}/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/Mute/Mute.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/SDCAlertView/SDCAlertView.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/objcTox/objcTox.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/JGProgressHUD Resources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Mute.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SDCAlertView.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/objcTox.bundle", ); @@ -1929,13 +1932,13 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Antidote/Pods-Antidote-resources.sh", - "${PODS_ROOT}/JGProgressHUD/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/Mute/Mute.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/SDCAlertView/SDCAlertView.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/objcTox/objcTox.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/JGProgressHUD Resources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Mute.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SDCAlertView.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/objcTox.bundle", ); @@ -2299,6 +2302,7 @@ 1117827E1DC52CBA000C1721 /* OCTSubmanagerCallsMock.swift in Sources */, 1149626C1C5CE3DF001E5435 /* ChangeUserStatusController.swift in Sources */, 115CE3E81EB06F54001C08A0 /* ChatBottomStatusViewManager.swift in Sources */, + F16BFEA72B98E0A800B65993 /* ChangeAppThemeController.swift in Sources */, 116634EF1C7B94530072C980 /* StaticTableMultiChoiceButtonCell.swift in Sources */, 116634A91C6E8D1A0072C980 /* ChatIncomingCallCellModel.swift in Sources */, 11FA0EDE1BC58DCC00F3DA5B /* CoordinatorProtocol.swift in Sources */, @@ -2641,6 +2645,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = Y46L589C5C; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = ScreenshotsUITests/Info.plist; @@ -2700,6 +2705,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = Y46L589C5C; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = ScreenshotsUITests/Info.plist; @@ -2781,7 +2787,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 105003; + CURRENT_PROJECT_VERSION = 105004; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -2801,7 +2807,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MARKETING_VERSION = 1.5.2; + MARKETING_VERSION = 1.5.3; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; @@ -2840,7 +2846,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 105003; + CURRENT_PROJECT_VERSION = 105004; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -2853,7 +2859,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MARKETING_VERSION = 1.5.2; + MARKETING_VERSION = 1.5.3; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; @@ -2941,7 +2947,9 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = Y46L589C5C; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; @@ -2972,8 +2980,10 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = Y46L589C5C; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = AntidoteTests/Info.plist; diff --git a/Antidote/AppCoordinator.swift b/Antidote/AppCoordinator.swift index 985f1d4..19651c8 100644 --- a/Antidote/AppCoordinator.swift +++ b/Antidote/AppCoordinator.swift @@ -11,7 +11,7 @@ class AppCoordinator { init(window: UIWindow) { self.window = window - + let filepath = Bundle.main.path(forResource: "default-theme", ofType: "yaml")! let yamlString = try! NSString(contentsOfFile:filepath, encoding:String.Encoding.utf8.rawValue) as String @@ -83,7 +83,7 @@ extension AppCoordinator: LoginCoordinatorDelegate { } // MARK: Private -private extension AppCoordinator { +extension AppCoordinator { func applyTheme(_ theme: Theme) { let linkTextColor = theme.colorForType(.LinkText) diff --git a/Antidote/ChangeAppThemeController.swift b/Antidote/ChangeAppThemeController.swift new file mode 100644 index 0000000..0d1f3fa --- /dev/null +++ b/Antidote/ChangeAppThemeController.swift @@ -0,0 +1,80 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +import UIKit + +protocol ChangeAppThemeControllerDelegate: class { + func changeAppThemeControllerDidChange(_ controller: ChangeAppThemeController) +} + +class ChangeAppThemeController: StaticTableController { + weak var delegate: ChangeAppThemeControllerDelegate? + + fileprivate let userDefaults: UserDefaultsManager + fileprivate let selectedStatus: UserDefaultsManager.AppTheme + + fileprivate let themeAutomatic = StaticTableDefaultCellModel() + fileprivate let themeLight = StaticTableDefaultCellModel() + fileprivate let themeDark = StaticTableDefaultCellModel() + + init(theme: Theme) { + self.userDefaults = UserDefaultsManager() + self.selectedStatus = userDefaults.appTheme + + super.init(theme: theme, style: .plain, model: [ + [themeAutomatic], + [themeLight], + [themeDark], + ], footers: [ + String(localized: "settings_theme_automatic_notice"), + nil, + nil] + ) + + updateModels() + + title = String(localized: "settings_theme_title") + } + + required convenience init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +private extension ChangeAppThemeController { + func updateModels() { + themeAutomatic.value = String(localized: "settings_theme_automatic") + themeAutomatic.didSelectHandler = changeThemeAutomatic + + themeLight.value = String(localized: "settings_theme_light") + themeLight.didSelectHandler = changeThemeLight + + themeDark.value = String(localized: "settings_theme_dark") + themeDark.didSelectHandler = changeThemeDark + + switch selectedStatus { + case .themeAutomatic: + themeAutomatic.rightImageType = .checkmark + case .themeLight: + themeLight.rightImageType = .checkmark + case .themeDark: + themeDark.rightImageType = .checkmark + } + } + + func changeThemeAutomatic(_: StaticTableBaseCell) { + userDefaults.appTheme = .themeAutomatic + delegate?.changeAppThemeControllerDidChange(self) + } + + func changeThemeLight(_: StaticTableBaseCell) { + userDefaults.appTheme = .themeLight + delegate?.changeAppThemeControllerDidChange(self) + } + + func changeThemeDark(_: StaticTableBaseCell) { + userDefaults.appTheme = .themeDark + delegate?.changeAppThemeControllerDidChange(self) + } +} diff --git a/Antidote/ChangeAutodownloadImagesController.swift b/Antidote/ChangeAutodownloadImagesController.swift index 8e52003..96bd7a1 100644 --- a/Antidote/ChangeAutodownloadImagesController.swift +++ b/Antidote/ChangeAutodownloadImagesController.swift @@ -32,7 +32,7 @@ class ChangeAutodownloadImagesController: StaticTableController { updateModels() - title = String(localized: "settings_autodownload_images") + title = String(localized: "settings_app_theme_title") } required convenience init?(coder aDecoder: NSCoder) { diff --git a/Antidote/ChatListController.swift b/Antidote/ChatListController.swift index 340e8f2..e79846b 100644 --- a/Antidote/ChatListController.swift +++ b/Antidote/ChatListController.swift @@ -72,7 +72,8 @@ private extension ChatListController { func createTableView() { let tableView = UITableView() - tableView.estimatedRowHeight = 44.0 + // TODO(Tha_14): Investigate if the removal of the following can cause problems + //tableView.estimatedRowHeight = 52.0 tableView.backgroundColor = theme.colorForType(.NormalBackground) tableView.sectionIndexColor = theme.colorForType(.LinkText) // removing separators on empty lines diff --git a/Antidote/ChatPrivateController.swift b/Antidote/ChatPrivateController.swift index fc5e9bc..f4c7361 100644 --- a/Antidote/ChatPrivateController.swift +++ b/Antidote/ChatPrivateController.swift @@ -174,6 +174,7 @@ class ChatPrivateController: KeyboardNotificationController, CLLocationManagerDe self.configureLinearProgressBar() } + // TODO(Tha_14): Remove the following func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { if let location = locations.first { let lat_str = String(format: "%.5f", location.coordinate.latitude) @@ -515,7 +516,7 @@ extension ChatPrivateController { print("Call_ERROR:no friend?") } } - + // TODO(Tha_14): Remove this // @objc func displayalert() { // var alert = UIAlertController(title: "Location Sharing", message: "Would you like to enable location sharing with this contact?\nYou can disable this feature by clicking on the location icon after it has been enabled.", preferredStyle: UIAlertControllerStyle.alert) // var action_title = "Enable" diff --git a/Antidote/FAQController.swift b/Antidote/FAQController.swift index a4f2840..d2e85ab 100644 --- a/Antidote/FAQController.swift +++ b/Antidote/FAQController.swift @@ -6,19 +6,14 @@ import Foundation import WebKit import SnapKit -private struct Constants { - static let FAQURL = "https://github.com/Zoxcore/Antidote/blob/develop/FAQ/en.md" -} - class FAQController: UIViewController { fileprivate let theme: Theme - + fileprivate let webConfiguration = WKWebViewConfiguration() fileprivate var webView: WKWebView! fileprivate var spinner: UIActivityIndicatorView! init(theme: Theme) { self.theme = theme - super.init(nibName: nil, bundle: nil) hidesBottomBarWhenPushed = true @@ -37,10 +32,38 @@ class FAQController: UIViewController { } override func viewDidLoad() { + webView.configuration.preferences.javaScriptEnabled = true super.viewDidLoad() + let contentController = self.webView.configuration.userContentController + contentController.add(self, name: "addSupportToxID") - let request = URLRequest(url: URL(string: Constants.FAQURL)!) - webView.load(request) + let url = Bundle.main.url(forResource: "FAQ_en", withExtension: "html") + let request = NSURLRequest(url: url!) + webView.load(request as URLRequest) + } + +} + +extension FAQController: WKScriptMessageHandler{ + func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { + // TODO(Tha_14): Change this so that we use the button to instead immediately add the friend. We need to carry the ToxManager object from the tab controller into the settings coordinator + UIPasteboard.general.string = "0525CEA07DC84D4CEF9154FB785344D573CD558140BEC7216845FDAC77FFEF7A993E21186874" + let alertController = UIAlertController(title: "ToxID copied to clipboard. Head to Contacts in Antidote and paste it in the Add Contact page.",message: nil,preferredStyle: + .alert) + + alertController.addAction(UIAlertAction(title: "OK", style: .cancel) {_ in }) + + self.present(alertController, animated: true, completion: nil) +// let message:String? = "Requesting Antidote support." +// let supportcontactid:String? = "0525CEA07DC84D4CEF9154FB785344D573CD558140BEC7216845FDAC77FFEF7A993E21186874" +// do { +// try submanagerFriends.sendFriendRequest(toAddress: supportcontactid, message: message) +// } +// catch _ as NSError { +// return +// } + + print("Adding support contact") } } @@ -54,6 +77,20 @@ extension FAQController: WKNavigationDelegate { } } +extension FAQController { + func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: + String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> + Void) { + let alertController = UIAlertController(title: message,message: nil,preferredStyle: + .alert) + + alertController.addAction(UIAlertAction(title: "OK", style: .cancel) {_ in + completionHandler()}) + + self.present(alertController, animated: true, completion: nil) + } +} + private extension FAQController { func createViews() { let configuration = WKWebViewConfiguration() diff --git a/Antidote/FAQ_en.html b/Antidote/FAQ_en.html new file mode 100644 index 0000000..a0f5c7b --- /dev/null +++ b/Antidote/FAQ_en.html @@ -0,0 +1,143 @@ +
+

+ + Frequently Asked Questions +

+ +

+ + How do I import my profile to Antidote? +

+

To import your profile to Antidote, do the following:

+
    +
  1. Send the .tox file to your device using any app (Mail, Dropbox, etc.).
  2. +
  3. Use Open In menu for this file.
  4. +
  5. Select Antidote in a list of available apps.
  6. +
  7. Check the name of your new profile and press OK.
  8. +
+

+ + How do I export my profile from Antidote? +

+

To export your profile from Antidote, do the following:

+
    +
  1. Open Profile tab
  2. +
  3. Select Profile Details +
  4. +
  5. Select Export Profile option.
  6. +
+

+ + How to synchronize Tox ID between multiple devices? +

+

There are a few solutions for multi-device support being developed but there is nothing concrete yet. For now you can export your .tox profile from one device and import it to another using the guides above. But we do NOT recommend that you use the same Tox ID on more than 1 device. If you want to go that route then you'll need to make sure that only one instance with your profile is running otherwise the multiple devices you use will fight over your availability and WILL cause issues.

+

+ + How do I receive push notifications in the background? +

+

Antidote works in the background for only about 30 seconds after the location access capability is paused, and after that Antidote will be suspended by iOS. Unfortunately, there is currently no easy way to extend this time except from signing yourself up to receive regular(every 10 minutes) push notifications in order to wake up Antidote and fetch messages.
THIS FEATURE IS NOT YET INCLUDED AND IS BEING ALPHA TESTED.

+

+ + Can I send messages to offline contacts? +

+

Antidote utilizes faux offline messaging.What this means is that the messages you send while you or your friend is offline are queued to be sent when both parties are online. If you send a message while your friend is offline he or she will receive the message only when you are both online at the same time.

+

+ + How to enable PIN and Touch ID? +

+

You can protect your profile with PIN or Touch ID. To do so:

+
    +
  1. Open Profile tab
  2. +
  3. Select Profile Details +
  4. +
  5. Turn on PIN Enabled switch
  6. +
  7. Turn on Touch ID Enabled switch (if available).
  8. +
+

+ + Does Antidote connect to any third party servers? +

+

Antidote(exlcuding toxcore) uses the Apple Push Notification service and a third party server to send push notifications to your device in order to wake Antidote up and fetch your messages from your contacts. This makes it possible for Mobile devices to go into sleep mode and save battery and network bandwidth when there is no activity. This is an optional feature you can enable through the settings(CURRENTLY NOT AVAILABLE). No ToxID, name or message data is transfered in the process of registering for this feature.

+

+ + Have questions or need help with something specific? +

+

You can add the maintainer as a friend by pressing the following button and then pasting the text into the add contact field in Antidote. I'll reply when I am available: + + +

+ +
+ + \ No newline at end of file diff --git a/Antidote/FriendListController.swift b/Antidote/FriendListController.swift index ce6dd54..3f75c4d 100644 --- a/Antidote/FriendListController.swift +++ b/Antidote/FriendListController.swift @@ -73,7 +73,7 @@ class FriendListController: UIViewController { print("EchobotAdded=\(UserDefaultsManager().EchobotAdded)") - if (UserDefaultsManager().EchobotAdded == false) { + if (UserDefaultsManager().EchobotAdded == true) { do { //try self.submanagerFriends.sendFriendRequest(toAddress: echobotid, message: message) UserDefaultsManager().EchobotAdded = true diff --git a/Antidote/OCTManagerConfigurationExtension.swift b/Antidote/OCTManagerConfigurationExtension.swift index d229131..9aefc28 100644 --- a/Antidote/OCTManagerConfigurationExtension.swift +++ b/Antidote/OCTManagerConfigurationExtension.swift @@ -16,6 +16,8 @@ extension OCTManagerConfiguration { let userDefaultsManager = UserDefaultsManager() configuration.options.ipv6Enabled = true + configuration.options.localDiscoveryEnabled = true + configuration.options.holePunchingEnabled = true configuration.options.udpEnabled = userDefaultsManager.UDPEnabled configuration.fileStorage = OCTDefaultFileStorage(baseDirectory: baseDirectory, temporaryDirectory: NSTemporaryDirectory()) diff --git a/Antidote/ProfileMainController.swift b/Antidote/ProfileMainController.swift index bba0201..64189e5 100644 --- a/Antidote/ProfileMainController.swift +++ b/Antidote/ProfileMainController.swift @@ -3,7 +3,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import UIKit -//import Firebase protocol ProfileMainControllerDelegate: class { func profileMainControllerLogout(_ controller: ProfileMainController) @@ -24,10 +23,9 @@ class ProfileMainController: StaticTableController { fileprivate let avatarModel = StaticTableAvatarCellModel() fileprivate let userNameModel = StaticTableDefaultCellModel() fileprivate let statusMessageModel = StaticTableDefaultCellModel() - // fileprivate let userStatusModel = StaticTableDefaultCellModel() + fileprivate let userStatusModel = StaticTableDefaultCellModel() fileprivate let toxIdModel = StaticTableDefaultCellModel() fileprivate let pushurlModel = StaticTableDefaultCellModel() -// fileprivate let capabilitiesModel = StaticTableDefaultCellModel() fileprivate let profileDetailsModel = StaticTableDefaultCellModel() fileprivate let logoutModel = StaticTableButtonCellModel() @@ -44,18 +42,12 @@ class ProfileMainController: StaticTableController { userNameModel, statusMessageModel, ], - //[ - // userStatusModel, - //], + [ + userStatusModel, + ], [ toxIdModel, ], -// [ -// pushurlModel, -// ], -// [ -// capabilitiesModel, -// ], [ profileDetailsModel, ], @@ -146,13 +138,12 @@ private extension ProfileMainController { userNameModel.rightImageType = .arrow userNameModel.didSelectHandler = changeUserName - // Hardcoding any connected status to show only online/away/busy statuses here. let userStatus = UserStatus(connectionStatus: OCTToxConnectionStatus.TCP, userStatus: submanagerUser.userStatus) - // userStatusModel.userStatus = userStatus - // userStatusModel.value = userStatus.toString() - // userStatusModel.rightImageType = .arrow - // userStatusModel.didSelectHandler = changeUserStatus + userStatusModel.userStatus = userStatus + userStatusModel.value = userStatus.toString() + userStatusModel.rightImageType = .arrow + userStatusModel.didSelectHandler = changeUserStatus statusMessageModel.title = String(localized: "status_message") statusMessageModel.value = submanagerUser.userStatusMessage() @@ -165,18 +156,6 @@ private extension ProfileMainController { toxIdModel.rightButtonHandler = showToxIdQR toxIdModel.userInteractionEnabled = false toxIdModel.canCopyValue = true - // for debugging print own ToxID ---------------- - // print("TOXID: \(submanagerUser.userAddress)") - // for debugging print own ToxID ---------------- -// -// pushurlModel.title = "Push URL" -// let pushtoken = Messaging.messaging().fcmToken ?? "" -// if (pushtoken.count > 0) { -// pushurlModel.value = "https://tox.zoff.xyz/toxfcm/fcm.php?id=" + pushtoken + "&type=1" -// } else { -// pushurlModel.value = "" -// } -// pushurlModel.userInteractionEnabled = false profileDetailsModel.value = String(localized: "profile_details") profileDetailsModel.didSelectHandler = showProfileDetails diff --git a/Antidote/SettingsAdvancedController.swift b/Antidote/SettingsAdvancedController.swift index d2bd13a..c4433d1 100644 --- a/Antidote/SettingsAdvancedController.swift +++ b/Antidote/SettingsAdvancedController.swift @@ -27,6 +27,9 @@ class SettingsAdvancedController: StaticTableController { [ restoreDefaultsModel, ], + ], footers: [ + String(localized: "settings_advanced_enable_udp"), + nil, ]) title = String(localized: "settings_advanced_settings") @@ -46,8 +49,6 @@ private extension SettingsAdvancedController { restoreDefaultsModel.title = String(localized: "settings_restore_default") restoreDefaultsModel.didSelectHandler = restoreDefaultsSettings - - //TODO(Tha_14): Add description text regarding use with tor, UDP required Disabled. } func UDPChanged(_ on: Bool) { diff --git a/Antidote/SettingsMainController.swift b/Antidote/SettingsMainController.swift index 5e2141d..b5b1072 100644 --- a/Antidote/SettingsMainController.swift +++ b/Antidote/SettingsMainController.swift @@ -9,6 +9,7 @@ protocol SettingsMainControllerDelegate: class { func settingsMainControllerShowFaqScreen(_ controller: SettingsMainController) func settingsMainControllerShowAdvancedSettings(_ controller: SettingsMainController) func settingsMainControllerChangeAutodownloadImages(_ controller: SettingsMainController) + func settingsMainControllerChangeAppTheme(_ controller: SettingsMainController) } class SettingsMainController: StaticTableController { @@ -21,6 +22,7 @@ class SettingsMainController: StaticTableController { fileprivate let faqModel = StaticTableDefaultCellModel() fileprivate let autodownloadImagesModel = StaticTableInfoCellModel() fileprivate let notificationsModel = StaticTableSwitchCellModel() + fileprivate let apptheme = StaticTableInfoCellModel() fileprivate let longerbgModel = StaticTableSwitchCellModel() fileprivate let debugmodeModel = StaticTableSwitchCellModel() fileprivate let dateonmessagemodeModel = StaticTableSwitchCellModel() @@ -38,21 +40,26 @@ class SettingsMainController: StaticTableController { // ], [ notificationsModel, - dateonmessagemodeModel, // debugmodeModel, ], +// [ +// apptheme, +// ], + [ + dateonmessagemodeModel, + ], [ advancedSettingsModel, ], [ -// faqModel, + faqModel, aboutModel, ], ], footers: [ String(localized: "settings_autodownload_images_description"), -// "This will keep the Application running for longer in the background to finish sending messages, but this will also reveal more meta data about you. It will link your IP address and your PUSH token. It's a tradeoff between convenience and metadata privacy.\n\nYou can use ProtonVPN to prevent that.\n\nSee https://protonvpn.com/free-vpn/\n\nand\n\nhttps://apps.apple.com/app/apple-store/id1437005085", - nil, - nil, + String(localized: "settings_notifications_description"), +// nil, + String(localized: "settings_always_show_date_on_messages_description"), nil, ]) @@ -93,6 +100,18 @@ private extension SettingsMainController{ case .Always: autodownloadImagesModel.value = String(localized: "settings_always") } + + apptheme.title = String(localized: "settings_theme_title") + apptheme.showArrow = true + apptheme.didSelectHandler = changeAppTheme + switch userDefaults.appTheme { + case .themeAutomatic: + apptheme.value = String(localized: "settings_theme_automatic") + case .themeLight: + apptheme.value = String(localized: "settings_theme_light") + case .themeDark: + apptheme.value = String(localized: "settings_theme_dark") + } notificationsModel.title = String(localized: "settings_notifications_message_preview") notificationsModel.on = userDefaults.showNotificationPreview @@ -142,6 +161,10 @@ private extension SettingsMainController{ func changeAutodownloadImages(_: StaticTableBaseCell) { delegate?.settingsMainControllerChangeAutodownloadImages(self) } + + func changeAppTheme(_: StaticTableBaseCell) { + delegate?.settingsMainControllerChangeAppTheme(self) + } func showAdvancedSettings(_: StaticTableBaseCell) { delegate?.settingsMainControllerShowAdvancedSettings(self) diff --git a/Antidote/SettingsTabCoordinator.swift b/Antidote/SettingsTabCoordinator.swift index 763c6a5..87d380c 100644 --- a/Antidote/SettingsTabCoordinator.swift +++ b/Antidote/SettingsTabCoordinator.swift @@ -58,6 +58,13 @@ extension SettingsTabCoordinator: SettingsMainControllerDelegate { navigationController.pushViewController(controller, animated: true) } + + func settingsMainControllerChangeAppTheme(_ controller: SettingsMainController) { + let controller = ChangeAppThemeController(theme: theme) + controller.delegate = self + + navigationController.pushViewController(controller, animated: true) + } func settingsMainControllerShowAdvancedSettings(_ controller: SettingsMainController) { let controller = SettingsAdvancedController(theme: theme) @@ -86,6 +93,12 @@ extension SettingsTabCoordinator: ChangeAutodownloadImagesControllerDelegate { } } +extension SettingsTabCoordinator: ChangeAppThemeControllerDelegate { + func changeAppThemeControllerDidChange(_ controller: ChangeAppThemeController) { + navigationController.popViewController(animated: true) + } +} + extension SettingsTabCoordinator: SettingsAdvancedControllerDelegate { func settingsAdvancedControllerToxOptionsChanged(_ controller: SettingsAdvancedController) { delegate?.settingsTabCoordinatorRecreateCoordinatorsStack(self, options: [ diff --git a/Antidote/UserDefaultsManager.swift b/Antidote/UserDefaultsManager.swift index f110265..397e9d3 100644 --- a/Antidote/UserDefaultsManager.swift +++ b/Antidote/UserDefaultsManager.swift @@ -41,7 +41,7 @@ class UserDefaultsManager { var DateonmessageMode: Bool { get { - return boolForKey(Keys.DateonmessageMode, defaultValue: true) + return boolForKey(Keys.DateonmessageMode, defaultValue: false) } set { setBool(newValue, forKey: Keys.DateonmessageMode) @@ -74,8 +74,7 @@ class UserDefaultsManager { var autodownloadImages: AutodownloadImages { get { - let defaultValue = AutodownloadImages.Never //Easy enough to reach option for users. Reverting change since there is an extremely high risk of people getting in trouble since an attacked can get you in prison by sending you cp. - + let defaultValue = AutodownloadImages.Never guard let string = stringForKey(Keys.AutodownloadImages) else { return defaultValue } @@ -85,6 +84,26 @@ class UserDefaultsManager { setObject(newValue.rawValue as AnyObject?, forKey: Keys.AutodownloadImages) } } + + enum AppTheme: String { + case themeAutomatic + case themeLight + case themeDark + } + + var appTheme: AppTheme { + get { + let defaultValue = AppTheme.themeAutomatic + + guard let string = stringForKey(Keys.AppTheme) else { + return defaultValue + } + return AppTheme(rawValue: string) ?? defaultValue + } + set { + setObject(newValue.rawValue as AnyObject?, forKey: Keys.AppTheme) + } + } func resetUDPEnabled() { removeObjectForKey(Keys.UDPEnabled) @@ -101,6 +120,7 @@ private extension UserDefaultsManager { static let ShowNotificationsPreview = "user-info/snow-notification-preview" static let LongerbgMode = "user-info/longerbg-mode" static let AutodownloadImages = "user-info/autodownload-images" + static let AppTheme = "user-info/app-theme" } func setObject(_ object: AnyObject?, forKey key: String) { diff --git a/Antidote/ar.lproj/Localizable.strings b/Antidote/ar.lproj/Localizable.strings index 15a04f1..c469fae 100644 --- a/Antidote/ar.lproj/Localizable.strings +++ b/Antidote/ar.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "التعليمات"; /* Settings menu / screen name */ "settings_advanced_settings" = "خصائص الاعدادات"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "إذا كنت تستخدم VPN (بما في ذلك orbot)، فستحتاج إلى إبقاء هذا الإعداد معطلاً وإلا فلن تتمكن من الاتصال بشبكة Tox."; /* About screen menu */ "settings_antidote_version" = "إصدار الانتيدوت"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "عرض الإشعارات"; /* Settings screen menu */ -"settings_notifications_description" = "حينما يتم عمل البرنامج في النظام، سيتم عرض الإشعارات حتى 10 دقائق."; +"settings_notifications_description" = "حينما يتم عمل البرنامج في النظام، سيتم عرض الإشعارات حتى 5 دقائق."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "عند تعطيل هذا الخيار يمكنك السحب من الجانب الأيمن لرؤية تاريخ ووقت الرسائل."; /* Settings screen menu */ "settings_udp_enabled" = "تفعيل UDP"; /* Settings screen menu */ diff --git a/Antidote/br.lproj/Localizable.strings b/Antidote/br.lproj/Localizable.strings index da5d0c0..5bcc908 100644 --- a/Antidote/br.lproj/Localizable.strings +++ b/Antidote/br.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAG"; /* Settings menu / screen name */ "settings_advanced_settings" = "Arventennoù araokaet"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = " Mar oc'h arverañ un VPN (ouzh an orbot) re t eo deoc'h kenderc'hel an arventennoù-mañ diweredekaet, hepken n'hallez ket kevreañ ouzh ar rouedad Tox. "; /* About screen menu */ "settings_antidote_version" = "Stumm Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Diskouez ar C'hemennadennoù"; /* Settings screen menu */ -"settings_notifications_description" = "Pa vo an arload war an drekleur, resev a rit kemennadennoù e-pad dek munud c'hoazh."; +"settings_notifications_description" = "Pa vo an arload war an drekleur, resev a rit kemennadennoù e-pad pemp munud c'hoazh."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Mar bez diweredekaet an dibarzh- mañ e c' hellit riklañ diouzh an tu dehou evit gwelet deiziad ha eur ar c' hemennadoù."; /* Settings screen menu */ "settings_udp_enabled" = "Gweredekaat an UDP"; /* Settings screen menu */ diff --git a/Antidote/ca.lproj/Localizable.strings b/Antidote/ca.lproj/Localizable.strings index bdccfe3..38feb9d 100644 --- a/Antidote/ca.lproj/Localizable.strings +++ b/Antidote/ca.lproj/Localizable.strings @@ -175,7 +175,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Previsualitzar les notificacions"; /* Settings screen menu */ -"settings_notifications_description" = "Quan l'aplicació passa a segon pla, rebràs notificacions durant 10 minuts."; +"settings_notifications_description" = "Quan l'aplicació passa a segon pla, rebràs notificacions durant 5 minuts."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Quan aquesta opció està desactivada, podeu tirar des del costat dret per veure la data i l'hora dels missatges."; /* Settings screen menu */ "settings_udp_enabled" = "Activar UDP"; /* Settings screen menu */ @@ -373,6 +375,8 @@ "notification_incoming_contact_request" = "Sol·licitud de contacte entrant"; /* Settings menu / screen name */ "settings_advanced_settings" = "Configuració avançada"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Si utilitzeu una VPN (inclòs orbot), heu de mantenir aquesta configuració desactivada, en cas contrari, no podreu connectar-vos a la xarxa Tox."; /* Settings screen menu */ "settings_autodownload_images_description" = "Descàrregar automàticament fitxers entrants."; /* Settings screen autodownload images option */ diff --git a/Antidote/cs.lproj/Localizable.strings b/Antidote/cs.lproj/Localizable.strings index 4f3fcf1..a2fdcfc 100644 --- a/Antidote/cs.lproj/Localizable.strings +++ b/Antidote/cs.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Pokročilé nastavení"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Pokud používáte VPN (včetně orbotu), musíte toto nastavení ponechat vypnuté, jinak se nebudete moci připojit k síti Tox."; /* About screen menu */ "settings_antidote_version" = "Verze Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Náhled notifikací"; /* Settings screen menu */ -"settings_notifications_description" = "Jakmile přepnete aplikaci do pozadí, budete dostavát notifikace dalších 10 minut."; +"settings_notifications_description" = "Jakmile přepnete aplikaci do pozadí, budete dostavát notifikace dalších 5 minut."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Když je tato možnost deaktivována, můžete zatažením z pravé strany zobrazit datum a čas zpráv."; /* Settings screen menu */ "settings_udp_enabled" = "Aktivovat UDP"; /* Settings screen menu */ @@ -408,4 +412,4 @@ /* Incoming message label */ "accessibility_incoming_message_label" = "Zpráva"; /* Outgoing message label */ -"accessibility_outgoing_message_label" = "Vaše zpráva"; \ No newline at end of file +"accessibility_outgoing_message_label" = "Vaše zpráva"; diff --git a/Antidote/da.lproj/Localizable.strings b/Antidote/da.lproj/Localizable.strings index e240f5b..59a6594 100644 --- a/Antidote/da.lproj/Localizable.strings +++ b/Antidote/da.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Avancerede indstillinger"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Hvis du bruger en VPN (inklusive orbot), skal du holde denne indstilling deaktiveret, ellers vil du ikke være i stand til at oprette forbindelse til Tox-netværket."; /* About screen menu */ "settings_antidote_version" = "Antidote version"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Notifikations-forevisning"; /* Settings screen menu */ -"settings_notifications_description" = "Når appen er i baggrunden vil du stadig modtage notifikationer i op til 10 minutter."; +"settings_notifications_description" = "Når appen er i baggrunden vil du stadig modtage notifikationer i op til 5 minutter."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Når denne indstilling er deaktiveret, kan du trække fra højre side for at se dato og klokkeslæt for beskederne."; /* Settings screen menu */ "settings_udp_enabled" = "Aktiver UDP"; /* Settings screen menu */ @@ -408,4 +412,4 @@ /* Incoming message label */ "accessibility_incoming_message_label" = "Besked"; /* Outgoing message label */ -"accessibility_outgoing_message_label" = "Din besked"; \ No newline at end of file +"accessibility_outgoing_message_label" = "Din besked"; diff --git a/Antidote/de.lproj/Localizable.strings b/Antidote/de.lproj/Localizable.strings index 4fa95eb..4de8089 100644 --- a/Antidote/de.lproj/Localizable.strings +++ b/Antidote/de.lproj/Localizable.strings @@ -199,6 +199,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Erweiterte Einstellungen"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Wenn Sie einen VPN (einschließlich Orbot) verwenden, müssen Sie diese Einstellung deaktiviert lassen, da Sie sonst keine Verbindung zum Tox-Netzwerk herstellen können."; /* About screen menu */ "settings_antidote_version" = "Antidote Version"; /* About screen menu */ @@ -214,7 +216,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Mitteilungsvorschau"; /* Settings screen menu */ -"settings_notifications_description" = "Wenn die App im Hintergrund ist, wirst du noch für bis zu 10 Minuten Benachrichtigungen erhalten."; +"settings_notifications_description" = "Wenn die App im Hintergrund ist, wirst du noch für bis zu 5 Minuten Benachrichtigungen erhalten."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Wenn diese Option deaktiviert ist, können Sie auf der rechten Seite das Datum und die Uhrzeit der Nachrichten anzeigen."; /* Settings screen menu */ "settings_udp_enabled" = "Aktiviere UDP"; /* Settings screen menu */ diff --git a/Antidote/el.lproj/Localizable.strings b/Antidote/el.lproj/Localizable.strings index d32a220..ac2bf4f 100644 --- a/Antidote/el.lproj/Localizable.strings +++ b/Antidote/el.lproj/Localizable.strings @@ -8,6 +8,8 @@ "settings_faq" = "Συχνές ερωτήσεις"; /* Settings menu / screen name */ "settings_advanced_settings" = "Ρυθμίσεις για προχωρημένους"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Εάν χρησιμοποιείτε VPN (συμπεριλαμβανομένου του orbot), θα πρέπει να διατηρήσετε αυτήν τη ρύθμιση απενεργοποιημένη, διαφορετικά δεν θα μπορείτε να συνδεθείτε στο δίκτυο Tox."; /* About screen menu */ "settings_antidote_version" = "Έκδοση Antidote"; /* About screen menu */ @@ -17,7 +19,9 @@ /* Settings screen menu */ "settings_autodownload_images_description" = "Αυτόματη λήψη εισερχομένων αρχείων."; /* Settings screen menu */ -"settings_notifications_description" = "Όταν η εφαρμογή πηγαίνει στο παρασκήνιο, θα εξακολουθείτε να λαμβάνετε ειδοποιήσεις για έως και 10 λεπτά."; +"settings_notifications_description" = "Όταν η εφαρμογή πηγαίνει στο παρασκήνιο, θα εξακολουθείτε να λαμβάνετε ειδοποιήσεις για έως και 5 λεπτά."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Όταν αυτή η επιλογή είναι απενεργοποιημένη, μπορείτε να τραβήξετε από τη δεξιά πλευρά για να δείτε την ημερομηνία και την ώρα των μηνυμάτων."; /* Settings screen autodownload images option */ "settings_never" = "Ποτέ"; /* Settings screen autodownload images option */ diff --git a/Antidote/en.lproj/Localizable.strings b/Antidote/en.lproj/Localizable.strings index f4933e4..cadb840 100644 --- a/Antidote/en.lproj/Localizable.strings +++ b/Antidote/en.lproj/Localizable.strings @@ -202,6 +202,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Advanced Settings"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "If you're using a VPN(including orbot) you need to keep this setting disabled otherwise you won't be able to connect to the Tox network."; /* About screen menu */ "settings_antidote_version" = "Antidote Version"; /* About screen menu */ @@ -217,7 +219,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Notification Preview"; /* Settings screen menu */ -"settings_notifications_description" = "When application goes to background, you will still receive notifications up to 10 minutes."; +"settings_notifications_description" = "When application goes to background, you will still receive notifications for up to 5 minutes."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "When this option is disabled you can pull from the right side to see the date and time of the messages."; /* Settings screen menu */ "settings_udp_enabled" = "Enable UDP"; /* Settings screen menu */ diff --git a/Antidote/es.lproj/Localizable.strings b/Antidote/es.lproj/Localizable.strings index 29b4782..afd4be4 100644 --- a/Antidote/es.lproj/Localizable.strings +++ b/Antidote/es.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Ajustes avanzados"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Si está utilizando una VPN (incluido Orbot), debe mantener esta configuración deshabilitada; de lo contrario, no podrá conectarse a la red Tox."; /* About screen menu */ "settings_antidote_version" = "Versión de Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Previsualización de notificaciones"; /* Settings screen menu */ -"settings_notifications_description" = "Cuando la aplicación pasa a segundo plano, se seguirán recibiendo notificaciones hasta 10 minutos después."; +"settings_notifications_description" = "Cuando la aplicación pasa a segundo plano, se seguirán recibiendo notificaciones hasta 5 minutos después."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Cuando esta opción está desactivada, puedes tirar desde el lado derecho para ver la fecha y hora de los mensajes."; /* Settings screen menu */ "settings_udp_enabled" = "Habilitar UDP"; /* Settings screen menu */ diff --git a/Antidote/fr.lproj/Localizable.strings b/Antidote/fr.lproj/Localizable.strings index df3d70c..52b44da 100644 --- a/Antidote/fr.lproj/Localizable.strings +++ b/Antidote/fr.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Réglages Avancés"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Si vous utilisez un VPN (y compris Orbot), vous devez garder ce paramètre désactivé, sinon vous ne pourrez pas vous connecter au réseau Tox."; /* About screen menu */ "settings_antidote_version" = "Version Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Aperçu des notifications"; /* Settings screen menu */ -"settings_notifications_description" = "Lorsque l'application sera en arrière-plan, vous recevrez encore des notifications pendant 10 minutes."; +"settings_notifications_description" = "Lorsque l'application sera en arrière-plan, vous recevrez encore des notifications pendant 5 minutes."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Lorsque cette option est désactivée, vous pouvez tirer depuis le côté droit pour voir la date et l'heure des messages."; /* Settings screen menu */ "settings_udp_enabled" = "Activer UDP"; /* Settings screen menu */ diff --git a/Antidote/it.lproj/Localizable.strings b/Antidote/it.lproj/Localizable.strings index 3a35810..1113468 100644 --- a/Antidote/it.lproj/Localizable.strings +++ b/Antidote/it.lproj/Localizable.strings @@ -137,7 +137,8 @@ "settings_faq" = "Domande frequenti"; /* Settings menu / screen name */ "settings_advanced_settings" = "Impostazioni avanzate"; - +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Se utilizzi una VPN (incluso orbot) devi mantenere questa impostazione disabilitata altrimenti non sarai in grado di connetterti alla rete Tox."; /* Settings menu / screen name */ "settings_about" = "Informazioni"; /* About screen menu */ @@ -155,7 +156,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Anteprima della notifica"; /* Settings screen menu */ -"settings_notifications_description" = "Quando l'applicazione va nello sfondo, riceverai ancora le notifiche fino a 10 minuti."; +"settings_notifications_description" = "Quando l'applicazione va nello sfondo, riceverai ancora le notifiche fino a 5 minuti."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Quando questa opzione è disabilitata puoi tirare dal lato destro per vedere la data e l'ora dei messaggi."; /* Settings screen menu */ "settings_udp_enabled" = "Abilita UDP"; /* Settings screen menu */ diff --git a/Antidote/ko.lproj/Localizable.strings b/Antidote/ko.lproj/Localizable.strings index 8ddeb3c..5441d80 100644 --- a/Antidote/ko.lproj/Localizable.strings +++ b/Antidote/ko.lproj/Localizable.strings @@ -202,6 +202,8 @@ "settings_faq" = "자주 묻는 질문들"; /* Settings menu / screen name */ "settings_advanced_settings" = "고급 설정"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "VPN(orbot 포함)을 사용하는 경우 이 설정을 비활성화해야 합니다. 그렇지 않으면 Tox 네트워크에 연결할 수 없습니다."; /* About screen menu */ "settings_antidote_version" = "Antidote 버전"; /* About screen menu */ @@ -217,7 +219,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "알림 미리보기"; /* Settings screen menu */ -"settings_notifications_description" = "응용 프로그램이 배경으로 전환되어도 최대 10분 동안 알림을 받게 됩니다."; +"settings_notifications_description" = "응용 프로그램이 배경으로 전환되어도 최대 5분 동안 알림을 받게 됩니다."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "이 옵션이 비활성화되면 오른쪽에서 당겨서 메시지의 날짜와 시간을 볼 수 있습니다."; /* Settings screen menu */ "settings_udp_enabled" = "UDP 활성화"; /* Settings screen menu */ diff --git a/Antidote/lt.lproj/Localizable.strings b/Antidote/lt.lproj/Localizable.strings index fafa520..77ec6ed 100644 --- a/Antidote/lt.lproj/Localizable.strings +++ b/Antidote/lt.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "DUK"; /* Settings menu / screen name */ "settings_advanced_settings" = "Išplėstiniai nustatymai"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Jei naudojate VPN (įskaitant orbot), šį nustatymą turite išjungti, kitaip negalėsite prisijungti prie Tox tinklo."; /* About screen menu */ "settings_antidote_version" = "Antidote versija"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Pranešimo peržiūra"; /* Settings screen menu */ -"settings_notifications_description" = "Kai programa pereis į foną, jūs vis dar 10-ies minučių laikotarpyje gausite pranešimus."; +"settings_notifications_description" = "Kai programa pereis į foną, jūs vis dar 5-ies minučių laikotarpyje gausite pranešimus."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Kai ši parinktis išjungta, galite patraukti iš dešinės, kad pamatytumėte pranešimų datą ir laiką."; /* Settings screen menu */ "settings_udp_enabled" = "Įjungti UDP"; /* Settings screen menu */ diff --git a/Antidote/nb.lproj/Localizable.strings b/Antidote/nb.lproj/Localizable.strings index 227bc2b..e83ec3d 100644 --- a/Antidote/nb.lproj/Localizable.strings +++ b/Antidote/nb.lproj/Localizable.strings @@ -90,6 +90,8 @@ "settings_faq" = "O-S-S"; /* Settings menu / screen name */ "settings_advanced_settings" = "Avanserte innstillinger"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Hvis du bruker en VPN (inkludert orbot) må du holde denne innstillingen deaktivert, ellers vil du ikke kunne koble til Tox-nettverket."; /* About screen menu */ "settings_antidote_version" = "Antidote-versjon"; /* About screen menu */ @@ -135,7 +137,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Merknadsforhåndsvisning"; /* Settings screen menu */ -"settings_notifications_description" = "Når programmer blir relegert til bakgrunnen vil du fremdeles få merknader i 10 minutter."; +"settings_notifications_description" = "Når programmer blir relegert til bakgrunnen vil du fremdeles få merknader i 5 minutter."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Når dette alternativet er deaktivert kan du trekke fra høyre side for å se dato og klokkeslett for meldingene."; /* Settings screen menu */ "settings_udp_enabled" = "Skru på UDP"; /* Settings screen autodownload images option */ diff --git a/Antidote/nl.lproj/Localizable.strings b/Antidote/nl.lproj/Localizable.strings index d01f1dd..354e7f3 100644 --- a/Antidote/nl.lproj/Localizable.strings +++ b/Antidote/nl.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Geavanceerde instellingen"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Als u een VPN (inclusief orbot) gebruikt, moet u deze instelling uitgeschakeld houden, anders kunt u geen verbinding maken met het Tox-netwerk."; /* About screen menu */ "settings_antidote_version" = "Antidote Versie"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Notificatie Voorbeeld"; /* Settings screen menu */ -"settings_notifications_description" = "When application goes to background, you will still receive notifications up to 10 minutes."; +"settings_notifications_description" = "When application goes to background, you will still receive notifications up to 5 minutes."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Wanneer deze optie is uitgeschakeld, kunt u vanaf de rechterkant de datum en tijd van de berichten bekijken."; /* Settings screen menu */ "settings_udp_enabled" = "Gebruik UDP"; /* Settings screen menu */ diff --git a/Antidote/pl.lproj/Localizable.strings b/Antidote/pl.lproj/Localizable.strings index c527e59..6d4e4ce 100644 --- a/Antidote/pl.lproj/Localizable.strings +++ b/Antidote/pl.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "Najczęstsze pytania"; /* Settings menu / screen name */ "settings_advanced_settings" = "Ustawienia zaawansowane"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Jeśli korzystasz z VPN (w tym z orbota), musisz wyłączyć to ustawienie, w przeciwnym razie nie będziesz mógł połączyć się z siecią Tox."; /* About screen menu */ "settings_antidote_version" = "Wersja programu Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Przegląd powiadomień"; /* Settings screen menu */ -"settings_notifications_description" = "Jeżeli aplikacja będzie działa w tle, to masz możliwość odbioru powiadomień jeszcze przez okres 10-u minut."; +"settings_notifications_description" = "Jeżeli aplikacja będzie działa w tle, to masz możliwość odbioru powiadomień jeszcze przez okres 5-u minut."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Gdy ta opcja jest wyłączona, możesz przeciągnąć z prawej strony, aby zobaczyć datę i godzinę wiadomości."; /* Settings screen menu */ "settings_udp_enabled" = "Uruchom transmisje poprzez UDP"; /* Settings screen menu */ diff --git a/Antidote/pt-BR.lproj/Localizable.strings b/Antidote/pt-BR.lproj/Localizable.strings index 40a9be4..2a597be 100644 --- a/Antidote/pt-BR.lproj/Localizable.strings +++ b/Antidote/pt-BR.lproj/Localizable.strings @@ -197,7 +197,9 @@ /* About screen menu */ "settings_acknowledgements" = "Agradecimentos"; /* Settings screen menu */ -"settings_notifications_description" = "Quando a aplicação fica em plano de fundo, você ainda recebe notificações em até 10 minutos."; +"settings_notifications_description" = "Quando a aplicação fica em plano de fundo, você ainda recebe notificações em até 5 minutos."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Quando esta opção está desabilitada você pode puxar do lado direito para ver a data e hora das mensagens."; /* Settings screen menu */ "settings_udp_enabled" = "Ativar UDP"; /* Settings screen menu */ @@ -221,6 +223,8 @@ "notification_incoming_file" = "Recebendo arquivo"; /* Settings menu / screen name */ "settings_advanced_settings" = "Configurações avançadas"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Se você estiver usando uma VPN (incluindo orbot), você precisará manter esta configuração desabilitada, caso contrário você não conseguirá se conectar à rede Tox."; /* About screen menu */ "settings_antidote_version" = "Versão do Antidote"; /* About screen menu */ diff --git a/Antidote/pt.lproj/Localizable.strings b/Antidote/pt.lproj/Localizable.strings index 895844b..c076938 100644 --- a/Antidote/pt.lproj/Localizable.strings +++ b/Antidote/pt.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Configurações avançadas"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Se você estiver usando uma VPN (incluindo orbot), você precisará manter esta configuração desabilitada, caso contrário você não conseguirá se conectar à rede Tox."; /* About screen menu */ "settings_antidote_version" = "Versão Antidote"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Pre-visualização de notificações"; /* Settings screen menu */ -"settings_notifications_description" = "Quando a aplicação fica em segundo plano, as notificações ficarão activas durante 10 minutos"; +"settings_notifications_description" = "Quando a aplicação fica em segundo plano, as notificações ficarão activas durante 5 minutos"; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Quando esta opção está desabilitada você pode puxar do lado direito para ver a data e hora das mensagens."; /* Settings screen menu */ "settings_udp_enabled" = "Enable UDP"; /* Settings screen menu */ diff --git a/Antidote/ru.lproj/Localizable.strings b/Antidote/ru.lproj/Localizable.strings index 7318ce2..5b2c87e 100644 --- a/Antidote/ru.lproj/Localizable.strings +++ b/Antidote/ru.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "Расширенные настройки"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "Если вы используете VPN (включая orbot), вам необходимо отключить этот параметр, иначе вы не сможете подключиться к сети Tox."; /* About screen menu */ "settings_antidote_version" = "Версия"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "Превью уведомлений"; /* Settings screen menu */ -"settings_notifications_description" = "Вы будете получать уведомления в течении 10 минут после сворачивания Antidote."; +"settings_notifications_description" = "Вы будете получать уведомления в течении 5 минут после сворачивания Antidote."; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "Когда эта опция отключена, вы можете потянуть с правой стороны, чтобы увидеть дату и время сообщений."; /* Settings screen menu */ "settings_udp_enabled" = "Использовать UDP"; /* Settings screen menu */ diff --git a/Antidote/zh.lproj/Localizable.strings b/Antidote/zh.lproj/Localizable.strings index 4d6fc33..9d577a5 100644 --- a/Antidote/zh.lproj/Localizable.strings +++ b/Antidote/zh.lproj/Localizable.strings @@ -203,6 +203,8 @@ "settings_faq" = "FAQ"; /* Settings menu / screen name */ "settings_advanced_settings" = "高级设置"; +/* Advanced settings / enable UDP description */ +"settings_advanced_enable_udp" = "如果您使用 VPN(包括 orbot),您需要禁用此设置,否则您将无法连接到 Tox 网络。"; /* About screen menu */ "settings_antidote_version" = "Antidote 版本"; /* About screen menu */ @@ -218,7 +220,9 @@ /* Settings screen menu */ "settings_notifications_message_preview" = "通知预览"; /* Settings screen menu */ -"settings_notifications_description" = "当应用程序进入后台之后,您仍会接收到 10 分钟以内的通知。"; +"settings_notifications_description" = "当应用程序进入后台之后,您仍会接收到 5 分钟以内的通知。"; +/* Settings screen menu */ +"settings_always_show_date_on_messages_description" = "禁用此选项后,您可以从右侧拉动以查看消息的日期和时间。"; /* Settings screen menu */ "settings_udp_enabled" = "Enable UDP"; /* Settings screen menu */ diff --git a/AntidoteTests/AntidoteTests-Bridging-Header.h b/AntidoteTests/AntidoteTests-Bridging-Header.h index 94dfa1b..ee7d3a4 100644 --- a/AntidoteTests/AntidoteTests-Bridging-Header.h +++ b/AntidoteTests/AntidoteTests-Bridging-Header.h @@ -36,7 +36,6 @@ #import "DDTTYLogger.h" #import -#import #import #import diff --git a/FAQ/en.md b/FAQ/en.md deleted file mode 100644 index 1420025..0000000 --- a/FAQ/en.md +++ /dev/null @@ -1,78 +0,0 @@ -# Frequently Asked Questions - -* [How do I import my profile to Antidote?](#how-do-i-import-my-profile-to-antidote) -* [How do I export my profile from Antidote?](#how-do-i-export-my-profile-from-antidote) -* [How to synchronize Tox ID between multiple devices?](#how-to-synchronize-tox-id-between-multiple-devices) -* [How do I receive push notifications in the background?](#how-do-i-receive-push-notifications-in-the-background) -* [Can I send message to offline contacts?](#can-i-send-messages-to-offline-contacts) -* [How to enable PIN and Touch ID?](#how-to-enable-pin-and-touch-id) -* [Does Antidote connect to any third party servers?](#does-antidote-connect-to-any-third-party-servers) -* [More Questions?](#more-questions) -* [Translations](#translations) - - -## How do I import my profile to Antidote? - -To import your profile to Antidote, do the following: - -1. Send the .tox file to your device using any app (Mail, Dropbox, etc.). -2. Use `Open In` menu for this file. -3. Select Antidote in a list of available apps. -4. Check the name of your new profile and press OK. - - -## How do I export my profile from Antidote? - -To export your profile from Antidote, do the following: - -1. Open `Profile` tab -2. Select `Profile Details` -3. Select `Export Profile` option. - - -## How to synchronize Tox ID between multiple devices? - -Multidevice support is being [developed](https://github.com/GrayHatter/toxcore/tree/multi-device) and is not yet complete. For now you can export your .tox profile from one device and import it to another using the guides above. -But we do NOT recommend that you use the same Tox ID on more than 1 device. - - -## How do I receive push notifications in the background? - -Antidote works in the background for only about 30 seconds, after that it will be suspended by iOS. Unfortunately, there is currently no way to extend this time. -Antidote does support push notifications. This is in a beta state, and not fully working in all situations yet. -Push Notifications are only supported currently by TRIfA (Android), Antidote (iOS) and a beta version of qTox (with Push Notification patch applied). - - -## Can I send messages to offline contacts? - -Offline messaging is now supported since version 1.4.2 - - -## How to enable PIN and Touch ID? - -You can protect your profile with PIN or Touch ID. -To do so: - -1. Open `Profile` tab -2. Select `Profile Details` -3. Turn on `PIN Enabled` switch -4. Turn on `Touch ID Enabled` switch (if available). - - -## Does Antidote connect to any third party servers? - -Antidote(exlcuding toxcore) uses the Google Firebase service and a third party server to deliver push notifications to other tox mobile users when they are offline. This makes it possible for Mobile devices to go into sleep mode and save battery and network bandwidth when there is no activity. Rest assured that the push notification does not contain any data, the request that comes from Antidote includes only the FCM token of your contact(s). No ToxID, name or message data is transfered in the process. - - -## More Questions? - -Open an Issue in this Github repository https://github.com/Zoxcore/Antidote/issues - - -## Translations - -Found any translation issues? - -You can help translate Antidote to your language. - -Learn more: https://hosted.weblate.org/engage/antidote/ diff --git a/Podfile b/Podfile index b286ade..ec18916 100644 --- a/Podfile +++ b/Podfile @@ -12,9 +12,10 @@ def common_pods pod 'UITextView+Placeholder', '~> 1.4.0' pod 'SDCAlertView', '~> 12.0.3' pod 'LNNotificationsUI', :git => 'https://github.com/LeoNatan/LNNotificationsUI.git', :commit => '3f75043fc6e77b4180b76cb6cfff4faa506ab9fc' - pod 'JGProgressHUD', '~> 1.4.0' - pod 'SnapKit', '~> 5.6.0' + pod 'JGProgressHUD', '~> 2.2.0' + pod 'SnapKit', '~> 5.6.0' # Update to 5.7.1 requires iOS 12.0 pod 'Yaml', '~> 3.4.4' + pod 'Mute', '~> 0.6.1' # To be used for changing tax status to busy when mute switch is toggled on end target :Antidote do diff --git a/README.md b/README.md index 8244f21..62a7077 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ See [CHANGELOG](CHANGELOG.md) for list of notable changes (unreleased, current a - Options in settings under advanced to set a socks5 proxy - Option under advanced to change the NoSpam(manual and a randomize button options) - Introduction modal when creating and signing in with a new profiles +- A confirmation popup upon deleting multiple items at once ## License