Compare commits

...

21 commits

Author SHA1 Message Date
Muhammad Khalid 62b9202ff8 - #163 2021-12-13 22:07:33 +05:00
Muhammad Khalid e75611c99c - #169 Fixed Contacts Row Size 2021-12-12 20:19:34 +05:00
Muhammad Khalid 450556c899 - #168 Removed online status indicators from chats/contacts lists 2021-12-12 20:01:39 +05:00
Mehrooz Khan 13877c5b76 - #167 Account settings simplification 2021-12-11 18:26:12 +05:00
Muhammad Khalid 5a867cec05 - #157 Remember that a contact supports audio/video 2021-11-20 16:06:25 +05:00
Muhammad Khalid 710e4c87cf - #154 Fall back to group JID if no name available 2021-11-20 13:51:50 +05:00
Muhammad Khalid d97bcc677b - #153 Call UI appears inside settings dialog 2021-11-03 00:25:25 +05:00
Muhammad Khalid a6eb07c65b - #152 CallKit: Handle video button during audio call 2021-11-03 00:19:36 +05:00
Muhammad Khalid a216da1ee9 - #151 CallKit: Support initiating outgoing phone calls 2021-11-02 22:40:25 +05:00
Muhammad Khalid 0e4cee2887 - #150 CallKit: Configurable reporting of call history 2021-10-29 23:40:06 +05:00
Muhammad Khalid ecf3d733b6 - #149 CallKit: Identify telephony calls using phone number handle type 2021-10-29 21:54:28 +05:00
Muhammad Khalid 453b8dc2b4 - Fixed Account Selection For Invitation Link 2021-10-29 21:33:59 +05:00
Matthew Wild d6b02316f5 AccountSettingsViewController: If no push settings are stored, report success disabling push
If nothing is stored, we likely don't have a registration to remove, so just succeed.
2021-10-29 16:08:19 +01:00
Muhammad Khalid 8c177b260a - #13 Added Invitation Creation 2021-10-29 18:18:00 +05:00
Muhammad Khalid d897d02d8c - Fixed Scroll to Bottom 2021-10-28 23:32:30 +05:00
Muhammad Khalid b029174be5 - Added Scroll To Top Limit 2021-10-28 18:12:34 +05:00
Muhammad Khalid f565c5afcf - Fixed MUC Scroll To Top 2021-10-28 16:41:44 +05:00
Muhammad Khalid a5400ffcd2 - Fixed #133 2021-10-28 00:39:25 +05:00
Muhammad Khalid 4d82de8eef - #146 Allow non-E2EE for configured telephony provider 2021-10-28 00:02:56 +05:00
Muhammad Khalid a83888cb66 - #147 Fixed 2021-10-27 13:10:22 +05:00
Muhammad Khalid 0d47f80db3 - #135 Updated TigaseSwift to 2.1.3 2021-10-27 12:59:45 +05:00
58 changed files with 912 additions and 405 deletions

View file

@ -24,7 +24,7 @@ import TigaseSwift
public class DBSchemaManager {
static let CURRENT_VERSION = 15;
static let CURRENT_VERSION = 16;
fileprivate let dbConnection: DBConnection;

8
Shared/db-schema-16.sql Normal file
View file

@ -0,0 +1,8 @@
BEGIN;
ALTER TABLE roster_items ADD COLUMN audio_call INTEGER;
ALTER TABLE roster_items ADD COLUMN video_call INTEGER;
COMMIT;
PRAGMA user_version = 16;

View file

@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="j1y-V4-xli">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="j1y-V4-xli">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Share View Controller-->
<scene sceneID="ceB-am-kn3">
<objects>
<viewController id="j1y-V4-xli" customClass="ShareViewController" customModule="Tigase_Messenger___Share" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="j1y-V4-xli" customClass="ShareViewController" customModule="Snikket___Share" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="8bI-gs-bmD"/>
<viewControllerLayoutGuide type="bottom" id="d5i-Ba-RvD"/>
@ -32,21 +29,21 @@
<!--Accounts-->
<scene sceneID="taW-D3-3Yx">
<objects>
<tableViewController storyboardIdentifier="accountSelectionViewController" title="Accounts" useStoryboardIdentifierAsRestorationIdentifier="YES" id="6l2-wd-vXh" customClass="AccountsTableViewController" customModule="Tigase_Messenger___Share" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="accountSelectionViewController" title="Accounts" useStoryboardIdentifierAsRestorationIdentifier="YES" id="6l2-wd-vXh" customClass="AccountsTableViewController" customModule="Snikket___Share" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="977-Qx-KPe">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="accountTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="accountTableViewCell" id="SZs-Vf-W54" customClass="AccountTableViewCell" customModule="Tigase_Messenger___Share" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="accountTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="accountTableViewCell" id="SZs-Vf-W54" customClass="AccountTableViewCell" customModule="Snikket___Share" customModuleProvider="target">
<rect key="frame" x="0.0" y="44.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SZs-Vf-W54" id="iwn-zZ-n1r">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="95D-JK-fLM">
<rect key="frame" x="8" y="8" width="359" height="27.5"/>
<rect key="frame" x="16" y="11" width="343" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -78,21 +75,21 @@
<!--Recipients-->
<scene sceneID="bWt-BT-C6m">
<objects>
<tableViewController storyboardIdentifier="recipientsSelectionViewController" title="Recipients" useStoryboardIdentifierAsRestorationIdentifier="YES" id="wpy-g7-270" customClass="RecipientsSelectionViewController" customModule="Tigase_Messenger___Share" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="recipientsSelectionViewController" title="Recipients" useStoryboardIdentifierAsRestorationIdentifier="YES" id="wpy-g7-270" customClass="RecipientsSelectionViewController" customModule="Snikket___Share" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="SH7-od-nvj">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="accountTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="recipientTableViewCell" id="lwl-dC-64B" customClass="RecipientTableViewCell" customModule="Tigase_Messenger___Share" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="accountTableViewCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="recipientTableViewCell" id="lwl-dC-64B" customClass="RecipientTableViewCell" customModule="Snikket___Share" customModuleProvider="target">
<rect key="frame" x="0.0" y="44.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lwl-dC-64B" id="0s3-Da-XsL">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Geq-xy-Tr2">
<rect key="frame" x="8" y="8" width="359" height="27.5"/>
<rect key="frame" x="16" y="11" width="343" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>

View file

@ -7,7 +7,10 @@
objects = {
/* Begin PBXBuildFile section */
370B6FD12748F31C00D14123 /* db-schema-16.sql in Resources */ = {isa = PBXBuildFile; fileRef = 370B6FD02748F31C00D14123 /* db-schema-16.sql */; };
37359BDF2731427500066DC1 /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37359BDE2731427500066DC1 /* Intents.framework */; };
373A8020271063E1000E50FE /* TelephonyProviderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373A801F271063E1000E50FE /* TelephonyProviderViewController.swift */; };
374AB4C3273153E700E16682 /* CallsAccountSelectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 374AB4C2273153E700E16682 /* CallsAccountSelectionController.swift */; };
3759635F26F72F1900831F4C /* Welcome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3759636126F72F1900831F4C /* Welcome.storyboard */; };
3759636A26F72FD700831F4C /* Groupchat.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3759636C26F72FD700831F4C /* Groupchat.storyboard */; };
3759637126F7303100831F4C /* VoIP.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3759637326F7303100831F4C /* VoIP.storyboard */; };
@ -16,6 +19,7 @@
3759638626F7317D00831F4C /* Account.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3759638826F7317D00831F4C /* Account.storyboard */; };
3759638D26F7320F00831F4C /* MIX.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3759638F26F7320F00831F4C /* MIX.storyboard */; };
3759A58C26F8C7CC002987B2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3759A58E26F8C7CC002987B2 /* Localizable.strings */; };
3763450E272C6CEF000BC01F /* CallsSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3763450D272C6CEF000BC01F /* CallsSettingsViewController.swift */; };
3776C43526EDC5F00047750B /* MessageStyling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3776C43426EDC5F00047750B /* MessageStyling.swift */; };
3795F92426FB69370067361A /* BartyCrouch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3795F92326FB69370067361A /* BartyCrouch.swift */; };
3797D5BD26E9E42E0091DAF8 /* AvatarColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3797D5BC26E9E42E0091DAF8 /* AvatarColors.swift */; };
@ -304,7 +308,10 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
370B6FD02748F31C00D14123 /* db-schema-16.sql */ = {isa = PBXFileReference; lastKnownFileType = text; path = "db-schema-16.sql"; sourceTree = "<group>"; };
37359BDE2731427500066DC1 /* Intents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intents.framework; path = System/Library/Frameworks/Intents.framework; sourceTree = SDKROOT; };
373A801F271063E1000E50FE /* TelephonyProviderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TelephonyProviderViewController.swift; sourceTree = "<group>"; };
374AB4C2273153E700E16682 /* CallsAccountSelectionController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallsAccountSelectionController.swift; sourceTree = "<group>"; };
3759635C26F72EAA00831F4C /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
3759635D26F72ED700831F4C /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main.strings; sourceTree = "<group>"; };
3759635E26F72ED700831F4C /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/MainInterface.strings; sourceTree = "<group>"; };
@ -334,6 +341,7 @@
3759639426F7481200831F4C /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Base; path = Base.lproj/Info.plist; sourceTree = "<group>"; };
3759A58D26F8C7CC002987B2 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
3759A58F26F8C7CF002987B2 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = "<group>"; };
3763450D272C6CEF000BC01F /* CallsSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallsSettingsViewController.swift; sourceTree = "<group>"; };
3776C43426EDC5F00047750B /* MessageStyling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageStyling.swift; sourceTree = "<group>"; };
3795F92326FB69370067361A /* BartyCrouch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BartyCrouch.swift; sourceTree = "<group>"; };
3797D5BC26E9E42E0091DAF8 /* AvatarColors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarColors.swift; sourceTree = "<group>"; };
@ -640,6 +648,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
37359BDF2731427500066DC1 /* Intents.framework in Frameworks */,
FE1A34A7258CD3EE0058B86A /* WebRTC.xcframework in Frameworks */,
FE5079F01CD3CA91001A015C /* Security.framework in Frameworks */,
3797D5C026EA456F0091DAF8 /* HSLuvSwift in Frameworks */,
@ -662,6 +671,7 @@
FE1908902584D69400CA049F /* Frameworks */ = {
isa = PBXGroup;
children = (
37359BDE2731427500066DC1 /* Intents.framework */,
FE1A349F258CD3E10058B86A /* WebRTC.xcframework */,
FE1908962584D69400CA049F /* OpenSSL.xcframework */,
);
@ -678,6 +688,7 @@
FE2D481924505F1600C13CE5 /* CallManager.swift */,
FE2D481B24518C2800C13CE5 /* RTCCameraVideoCapturer_Format.swift */,
FE1A07472525EDD4004F38A0 /* ExternalServiceDiscovery_Service_extension.swift */,
374AB4C2273153E700E16682 /* CallsAccountSelectionController.swift */,
);
path = voip;
sourceTree = "<group>";
@ -767,26 +778,27 @@
FE507A0A1CDB7B3B001A015C /* settings */ = {
isa = PBXGroup;
children = (
FE6545611E9E7FDE006A14AC /* AccountDomainTableViewCell.swift */,
FE17808C23EB4C7F00A1EA76 /* AccountQRCodeController.swift */,
FEF80DB11CDBBBFE005645A7 /* AccountSettingsViewController.swift */,
FE507A0B1CDB7B3B001A015C /* AccountTableViewCell.swift */,
FE507A0C1CDB7B3B001A015C /* AddAccountController.swift */,
FE507A0D1CDB7B3B001A015C /* SettingsViewController.swift */,
FEF80DB11CDBBBFE005645A7 /* AccountSettingsViewController.swift */,
FE80BDAA1D953FC4001914B0 /* SetupViewController.swift */,
FE65455F1E9E7B85006A14AC /* RegisterAccountController.swift */,
FE6545611E9E7FDE006A14AC /* AccountDomainTableViewCell.swift */,
FE6545631E9E8B67006A14AC /* ServerSelectorTableViewCell.swift */,
FEDC678F238B05E4005C0FAB /* BlockedContactsController.swift */,
FE9E136C1F25F5F7005C0EE5 /* ChatSettingsViewController.swift */,
FE9E136E1F26049A005C0EE5 /* NotificationSettingsViewController.swift */,
FE9E13701F2606E9005C0EE5 /* ContactsSettingsViewController.swift */,
FE00157E2019090300490340 /* ExperimentalSettingsViewController.swift */,
FE0E31112537288A0030F8C5 /* MediaSettingsVIewController.swift */,
FE9E136E1F26049A005C0EE5 /* NotificationSettingsViewController.swift */,
FE719E7D2274D20D007CEEC9 /* OMEMOFingerprintsController.swift */,
E963721126D79D3A00332482 /* PrivacyPolicyTableViewCell.swift */,
FE65455F1E9E7B85006A14AC /* RegisterAccountController.swift */,
FE2809802167CE18002F5BD0 /* server_features_list.xml */,
FE2809822167CF1B002F5BD0 /* ServerFeaturesViewController.swift */,
FE719E7D2274D20D007CEEC9 /* OMEMOFingerprintsController.swift */,
FEDC678F238B05E4005C0FAB /* BlockedContactsController.swift */,
FE17808C23EB4C7F00A1EA76 /* AccountQRCodeController.swift */,
FE0E31112537288A0030F8C5 /* MediaSettingsVIewController.swift */,
E963721126D79D3A00332482 /* PrivacyPolicyTableViewCell.swift */,
FE6545631E9E8B67006A14AC /* ServerSelectorTableViewCell.swift */,
FE507A0D1CDB7B3B001A015C /* SettingsViewController.swift */,
FE80BDAA1D953FC4001914B0 /* SetupViewController.swift */,
373A801F271063E1000E50FE /* TelephonyProviderViewController.swift */,
3763450D272C6CEF000BC01F /* CallsSettingsViewController.swift */,
);
path = settings;
sourceTree = "<group>";
@ -896,6 +908,7 @@
FEBC12F124C70DE000689475 /* db-schema-13.sql */,
E928AD4226D6A08A00F29F93 /* db-schema-14.sql */,
379D914926E8A0E300B877CA /* db-schema-15.sql */,
370B6FD02748F31C00D14123 /* db-schema-16.sql */,
);
path = Shared;
sourceTree = "<group>";
@ -1291,6 +1304,7 @@
FE759FEF2371F21C001E78D9 /* db-schema-3.sql in Resources */,
FEC79199241BE89E007BE572 /* db-schema-11.sql in Resources */,
FE759FED2371F213001E78D9 /* db-schema-2.sql in Resources */,
370B6FD12748F31C00D14123 /* db-schema-16.sql in Resources */,
FECEF29823B7B838007EC323 /* db-schema-9.sql in Resources */,
FE3BA0C024B61583000C80D4 /* db-schema-12.sql in Resources */,
FE759FF02371F21C001E78D9 /* db-schema-4.sql in Resources */,
@ -1448,6 +1462,7 @@
373A8020271063E1000E50FE /* TelephonyProviderViewController.swift in Sources */,
FE3E38862428C21100D3A8E8 /* OSLog.swift in Sources */,
FECEF29423B7933A007EC323 /* MetadataCache.swift in Sources */,
3763450E272C6CEF000BC01F /* CallsSettingsViewController.swift in Sources */,
E9D384B426CA95FF009BEAF3 /* UIDeviceExtension.swift in Sources */,
FEB62C501DA80956001500D5 /* AvatarStore.swift in Sources */,
FE7D293423B919FF001A877D /* DownloadManager.swift in Sources */,
@ -1511,6 +1526,7 @@
FE2D481C24518C2800C13CE5 /* RTCCameraVideoCapturer_Format.swift in Sources */,
FE4071E421E2605900F09B58 /* VideoCallController.swift in Sources */,
FE9E13731F260B33005C0EE5 /* StepperTableViewCell.swift in Sources */,
374AB4C3273153E700E16682 /* CallsAccountSelectionController.swift in Sources */,
FE6545601E9E7B85006A14AC /* RegisterAccountController.swift in Sources */,
FE507A181CDB7B3B001A015C /* ChatViewController.swift in Sources */,
FEFB63AD1F31E4EE00EFB3E7 /* MainTabBarController.swift in Sources */,

View file

@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/tigase/tigase-swift",
"state": {
"branch": null,
"revision": "028e297fa4de25ac552b9947a8ccd29ade7001e7",
"version": "2.1.2"
"revision": "d3953dcea80010ad433fa96d7ca6b989bf58850c",
"version": "2.1.3"
}
},
{

View file

@ -39,6 +39,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View file

@ -25,6 +25,7 @@ import TigaseSwift
import Shared
import WebRTC
import BackgroundTasks
import Intents
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
@ -769,6 +770,100 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
case register
}
}
}
// Making Call From System Calls App
extension AppDelegate {
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
let interaction = userActivity.interaction
if let startAudioCallIntent = interaction?.intent as? INStartAudioCallIntent {
let contact = startAudioCallIntent.contacts?.first
let contactHandle = contact?.personHandle
if let callTo = contactHandle?.value {
if contactHandle?.type == .phoneNumber {
// call from telephony configured account
getTelephonyConfiguredAccounts(completion: { [callTo] account, provider in
self.makeOutgoingCall(account: account, callTo: callTo + "@" + provider, type: .phoneNumber)
})
} else {
// show account selection to make call
showAccountSelection(accounts: AccountManager.getActiveAccounts()) { [callTo] account in
self.makeOutgoingCall(account: account, callTo: callTo, type: .unknown)
}
}
}
}
else if let _ = interaction?.intent as? INStartVideoCallIntent {
let alert : UIAlertController = UIAlertController(title: NSLocalizedString("Video not available", comment: ""), message: NSLocalizedString("This is an audio call, and no video is available", comment: ""), preferredStyle: .alert)
let ok = UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .cancel, handler: nil)
alert.addAction(ok)
DispatchQueue.main.asyncAfter(deadline: .now()+1, execute: {
self.window?.rootViewController?.presentedViewController?.present(alert, animated: true, completion: nil)
})
}
return true
}
func getTelephonyConfiguredAccounts(completion: @escaping (BareJID,String) -> Void) {
var telephonyAccounts = [BareJID:String]()
let accounts = AccountManager.getActiveAccounts()
for account in accounts {
if let provider = AccountSettings.telephonyProvider(account).getString() {
telephonyAccounts[account] = provider
}
}
if telephonyAccounts.isEmpty {
// show alert
showNoProviderConfigured()
} else if telephonyAccounts.count == 1, let first = telephonyAccounts.first {
completion(first.key,first.value)
} else {
// show account selection sheet
showAccountSelection(accounts: Array(telephonyAccounts.keys), completion: { selectedAccount in
completion(selectedAccount ,telephonyAccounts[selectedAccount] ?? "")
})
}
}
func showNoProviderConfigured() {
let alert : UIAlertController = UIAlertController(title: NSLocalizedString("No Telephony Provider!", comment: ""), message: NSLocalizedString("Please Select a Telephony Provider from Settings", comment: ""), preferredStyle: .alert)
let ok = UIAlertAction(title: NSLocalizedString("OK", comment: ""), style: .cancel, handler: nil)
alert.addAction(ok)
self.window?.rootViewController?.present(alert, animated: true, completion: nil)
}
func showAccountSelection(accounts: [BareJID], completion: @escaping (BareJID) -> Void) {
let alert : UIAlertController = UIAlertController(title: NSLocalizedString("Select Account for Call", comment: ""), message: nil, preferredStyle: .alert)
alert.view.backgroundColor = .black
alert.view.layer.cornerRadius = 8.0
let contactNumVC = CallsAccountSelectionController()
contactNumVC.accounts = accounts
contactNumVC.preferredContentSize = CGSize(width: alert.view.frame.width, height: (50.0 * CGFloat(accounts.count)))
alert.setValue(contactNumVC, forKeyPath: "contentViewController")
let cancel = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil)
alert.addAction(cancel)
contactNumVC.didSelectAccount = { account in
print(account)
completion(account)
}
self.window?.rootViewController?.present(alert, animated: true, completion: nil)
}
func makeOutgoingCall(account: BareJID, callTo: String, type: INPersonHandleType) {
guard let rootVC = self.window?.rootViewController else { return }
let jid = BareJID(callTo)
#if targetEnvironment(simulator)
#else
VideoCallController.call(jid: jid, from: account, media: [.audio], sender: rootVC)
#endif
}
}

View file

@ -502,36 +502,12 @@
<segue destination="0fr-Ms-ALR" kind="show" identifier="EditAccountSegue" id="opM-M0-zrX"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="27D-rn-4zp" detailTextLabel="JkB-3h-A61" style="IBUITableViewCellStyleValue1" id="Jh1-9Y-aPh">
<rect key="frame" x="0.0" y="275.0000057220459" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Jh1-9Y-aPh" id="ze1-5H-0b4">
<rect key="frame" x="0.0" y="0.0" width="349.33333333333331" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Nickname" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="27D-rn-4zp">
<rect key="frame" x="16" y="11.999999999999998" width="76" height="20.333333333333332"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="JkB-3h-A61">
<rect key="frame" x="297.66666666666663" y="11.999999999999998" width="43.666666666666664" height="20.333333333333332"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Push Notifications" id="PvC-LX-0Sp">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="HIy-qD-9WC">
<rect key="frame" x="0.0" y="368.33333969116211" width="375" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="324.66667175292969" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="HIy-qD-9WC" id="xoJ-Lu-9Eg">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
@ -550,43 +526,12 @@
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="opT-Sn-Rio">
<rect key="frame" x="0.0" y="412.00000762939453" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="opT-Sn-Rio" id="7Lw-8e-1Ol">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="When in Away/XA/DND state" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aKW-CM-bl2">
<rect key="frame" x="16" y="11.666666666666666" width="215.33333333333334" height="20.666666666666671"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cdb-o8-Y70">
<rect key="frame" x="318" y="6.3333333333333321" width="51" height="30.999999999999996"/>
<connections>
<action selector="pushNotificationsForAwaySwitchChangedValue:" destination="6yM-ZG-ryL" eventType="valueChanged" id="4Qx-7X-CZt"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstItem="cdb-o8-Y70" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="aKW-CM-bl2" secondAttribute="trailing" constant="8" id="UO0-FD-Gsk"/>
<constraint firstItem="aKW-CM-bl2" firstAttribute="leading" secondItem="7Lw-8e-1Ol" secondAttribute="leadingMargin" id="l86-do-mbn"/>
<constraint firstItem="aKW-CM-bl2" firstAttribute="centerY" secondItem="7Lw-8e-1Ol" secondAttribute="centerY" id="rPu-Em-VFa"/>
<constraint firstItem="cdb-o8-Y70" firstAttribute="centerY" secondItem="7Lw-8e-1Ol" secondAttribute="centerY" id="s0n-kn-9rS"/>
</constraints>
</tableViewCellContentView>
<constraints>
<constraint firstAttribute="trailing" secondItem="cdb-o8-Y70" secondAttribute="trailing" constant="8" id="bdJ-Ov-Ugx"/>
</constraints>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Telephony" id="WFs-jm-Wmk">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="9bb-Ha-oU0">
<rect key="frame" x="0.0" y="505.33334159851074" width="375" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="418.0000057220459" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9bb-Ha-oU0" id="Rsa-rx-Qh1">
<rect key="frame" x="0.0" y="0.0" width="349.33333333333331" height="43.666667938232422"/>
@ -625,7 +570,7 @@
<tableViewSection headerTitle="Encryption" id="Et5-H6-t7C">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="gi7-rI-bRZ">
<rect key="frame" x="0.0" y="598.66667556762695" width="375" height="68.333335876464844"/>
<rect key="frame" x="0.0" y="511.33333969116211" width="375" height="68.333335876464844"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gi7-rI-bRZ" id="xQ3-o4-BUs">
<rect key="frame" x="0.0" y="0.0" width="349.33333333333331" height="68.333335876464844"/>
@ -669,7 +614,7 @@
<tableViewSection id="gLQ-zI-ugx">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="GWw-NK-6oU" style="IBUITableViewCellStyleDefault" id="TWF-EZ-7xa">
<rect key="frame" x="0.0" y="703.0000114440918" width="375" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="615.66667556762695" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TWF-EZ-7xa" id="5Bw-5e-Taj">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
@ -686,14 +631,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="lGT-wY-qtX" style="IBUITableViewCellStyleDefault" id="EDd-V2-4pv">
<rect key="frame" x="0.0" y="746.66667938232422" width="375" height="44"/>
<rect key="frame" x="0.0" y="659.33334350585938" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EDd-V2-4pv" id="aFo-M2-ndE">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Delete account" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lGT-wY-qtX">
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
<rect key="frame" x="16" y="0.0" width="343" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
<color key="textColor" systemColor="systemRedColor"/>
@ -724,9 +669,7 @@
<outlet property="companyTextView" destination="vF4-tE-C74" id="9JD-RQ-LF4"/>
<outlet property="enabledSwitch" destination="LhN-Xx-9am" id="2Wk-Hk-9kE"/>
<outlet property="fullNameTextView" destination="bDD-UG-Fxr" id="p8h-Gy-5oj"/>
<outlet property="nicknameLabel" destination="JkB-3h-A61" id="LTW-2n-tC2"/>
<outlet property="omemoFingerprint" destination="BE2-bI-S0Z" id="HXB-VX-Pvv"/>
<outlet property="pushNotificationsForAwaySwitch" destination="cdb-o8-Y70" id="GgR-H7-wXn"/>
<outlet property="telephonyProviderLabel" destination="StS-4J-0Uu" id="3FT-4X-Jcu"/>
</connections>
</tableViewController>
@ -780,7 +723,7 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" allowsSelectionDuringEditing="YES" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="6Lb-xD-6si">
<rect key="frame" x="0.0" y="0.0" width="600" height="1500"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AvatarEditCell" id="Jdf-2W-ONn" customClass="VCardAvatarEditCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="49" width="600" height="246"/>
@ -845,6 +788,7 @@
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="F9p-Vm-8vJ" firstAttribute="top" secondItem="v2b-uZ-hel" secondAttribute="top" id="63M-ZW-dwb"/>
<constraint firstItem="rQI-rm-8Af" firstAttribute="bottom" secondItem="F9p-Vm-8vJ" secondAttribute="bottom" id="I1f-Ng-2Ln"/>
@ -855,6 +799,7 @@
<constraint firstItem="rQI-rm-8Af" firstAttribute="top" secondItem="F9p-Vm-8vJ" secondAttribute="top" id="sKf-9V-RBI"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="textField" destination="F9p-Vm-8vJ" id="Env-Ti-HX1"/>
</connections>
@ -1138,7 +1083,7 @@
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="e2k-FJ-jGF"/>
</constraints>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" name="AddToContactsBar"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" returnKeyType="done"/>
<connections>
@ -1147,7 +1092,7 @@
</textView>
</subviews>
<viewLayoutGuide key="safeArea" id="pu1-DH-CNk"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="NMR-Vu-B8R" firstAttribute="leading" secondItem="pu1-DH-CNk" secondAttribute="leading" constant="20" id="2bE-Ni-hBc"/>
<constraint firstItem="pu1-DH-CNk" firstAttribute="trailing" secondItem="NMR-Vu-B8R" secondAttribute="trailing" constant="20" id="QVu-mo-C8M"/>
@ -1307,6 +1252,9 @@
</inferredMetricsTieBreakers>
<resources>
<image name="chevron.right" catalog="system" width="96" height="128"/>
<namedColor name="AddToContactsBar">
<color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="chatslistBackground">
<color red="0.99607843137254903" green="0.85490196078431369" blue="0.023529411764705882" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</namedColor>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vAU-gJ-Tx3">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="vAU-gJ-Tx3">
<device id="retina6_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@ -557,31 +557,41 @@
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<color key="separatorColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="RosterItemTableViewCell" selectionStyle="none" indentationWidth="10" reuseIdentifier="RosterItemTableViewCell" rowHeight="48" id="ONc-pU-DYD" customClass="RosterItemTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="44.666666030883789" width="428" height="48"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="RosterItemTableViewCell" selectionStyle="none" indentationWidth="10" reuseIdentifier="RosterItemTableViewCell" rowHeight="56" id="ONc-pU-DYD" customClass="RosterItemTableViewCell" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="44.666666030883789" width="428" height="56"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" tableViewCell="ONc-pU-DYD" id="UqK-Bi-A4U">
<rect key="frame" x="0.0" y="0.0" width="428" height="48"/>
<rect key="frame" x="0.0" y="0.0" width="428" height="56"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="cbu-SQ-mtx">
<rect key="frame" x="2" y="2" width="424" height="44"/>
<stackView opaque="NO" contentMode="scaleToFill" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="cbu-SQ-mtx">
<rect key="frame" x="6" y="4" width="420" height="48"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PEi-Gx-E77" customClass="AvatarStatusView" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="56" height="48"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jqt-KR-cfI" customClass="AvatarView" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="44" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Jqt-KR-cfI" customClass="AvatarView" customModule="Snikket" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="56" height="48"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="first" translatesAutoresizingMaskIntoConstraints="NO" id="ZJ9-1V-mBH">
<rect key="frame" x="34" y="34" width="10" height="10"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="first" translatesAutoresizingMaskIntoConstraints="NO" id="ZJ9-1V-mBH">
<rect key="frame" x="40" y="32" width="16" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="8Ut-4o-MCF"/>
<constraint firstAttribute="width" constant="16" id="f0Y-p3-4fH"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="bhT-5q-V8P"/>
<constraint firstAttribute="bottom" secondItem="ZJ9-1V-mBH" secondAttribute="bottom" id="1Cd-Rh-95l"/>
<constraint firstItem="Jqt-KR-cfI" firstAttribute="leading" secondItem="PEi-Gx-E77" secondAttribute="leading" id="Iyu-68-zRI"/>
<constraint firstItem="Jqt-KR-cfI" firstAttribute="top" secondItem="PEi-Gx-E77" secondAttribute="top" id="Pnj-8B-KnM"/>
<constraint firstAttribute="trailing" secondItem="Jqt-KR-cfI" secondAttribute="trailing" id="VW7-CN-hhs"/>
<constraint firstAttribute="height" constant="56" id="Xkb-u7-2j9"/>
<constraint firstAttribute="width" secondItem="PEi-Gx-E77" secondAttribute="height" multiplier="1:1" id="ZCW-Dj-FnC"/>
<constraint firstAttribute="width" constant="56" id="bhT-5q-V8P"/>
<constraint firstAttribute="bottom" secondItem="Jqt-KR-cfI" secondAttribute="bottom" id="kfN-mk-NsZ"/>
<constraint firstAttribute="trailing" secondItem="ZJ9-1V-mBH" secondAttribute="trailing" id="yMj-DG-d75"/>
</constraints>
<connections>
<outlet property="avatarImageView" destination="Jqt-KR-cfI" id="yHN-bk-KrZ"/>
@ -589,10 +599,10 @@
</connections>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fPJ-VF-UlI">
<rect key="frame" x="54" y="0.0" width="370" height="44"/>
<rect key="frame" x="64" y="0.0" width="356" height="48"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vEG-as-CLS">
<rect key="frame" x="0.0" y="0.0" width="370" height="26"/>
<rect key="frame" x="0.0" y="0.0" width="356" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
<attributedString key="userComments">
@ -600,7 +610,7 @@
</attributedString>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tRD-rd-7dm">
<rect key="frame" x="0.0" y="26" width="370" height="18"/>
<rect key="frame" x="0.0" y="30" width="356" height="18"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="15"/>
<nil key="highlightedColor"/>
<attributedString key="userComments">
@ -613,10 +623,10 @@
</stackView>
</subviews>
<constraints>
<constraint firstItem="cbu-SQ-mtx" firstAttribute="leading" secondItem="UqK-Bi-A4U" secondAttribute="leading" constant="2" id="BAi-EZ-OZn"/>
<constraint firstItem="cbu-SQ-mtx" firstAttribute="leading" secondItem="UqK-Bi-A4U" secondAttribute="leading" constant="6" id="BAi-EZ-OZn"/>
<constraint firstAttribute="trailing" secondItem="cbu-SQ-mtx" secondAttribute="trailing" constant="2" id="FjQ-IY-JEo"/>
<constraint firstAttribute="bottom" secondItem="cbu-SQ-mtx" secondAttribute="bottom" constant="2" id="KPQ-Ln-nwb"/>
<constraint firstItem="cbu-SQ-mtx" firstAttribute="top" secondItem="UqK-Bi-A4U" secondAttribute="top" constant="2" id="zaP-Ho-3Uk"/>
<constraint firstAttribute="bottom" secondItem="cbu-SQ-mtx" secondAttribute="bottom" constant="4" id="KPQ-Ln-nwb"/>
<constraint firstItem="cbu-SQ-mtx" firstAttribute="top" secondItem="UqK-Bi-A4U" secondAttribute="top" constant="4" id="zaP-Ho-3Uk"/>
</constraints>
</tableViewCellContentView>
<connections>
@ -776,14 +786,14 @@
<scene sceneID="7R8-sh-AnU">
<objects>
<tableViewController id="WDE-Vb-oKK" customClass="RosterItemEditViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Ock-Af-3IY">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="Ock-Af-3IY">
<rect key="frame" x="0.0" y="0.0" width="428" height="926"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="Account" id="Mfv-HJ-QDO">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="mk1-zp-AU3">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="mk1-zp-AU3">
<rect key="frame" x="0.0" y="49" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mk1-zp-AU3" id="Da1-kS-KYt">
@ -808,7 +818,7 @@
</tableViewSection>
<tableViewSection headerTitle="JID" id="Qgj-eQ-geg">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="ubC-3x-1ej">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="ubC-3x-1ej">
<rect key="frame" x="0.0" y="142.66666603088379" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ubC-3x-1ej" id="6FY-Rq-hWY">
@ -833,7 +843,7 @@
</tableViewSection>
<tableViewSection headerTitle="Name" id="Kfl-J5-hdD">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="bnU-C3-Ei1">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="bnU-C3-Ei1">
<rect key="frame" x="0.0" y="236.33333206176758" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bnU-C3-Ei1" id="sWs-wY-Vy8">
@ -858,7 +868,7 @@
</tableViewSection>
<tableViewSection headerTitle="PRESENCE" id="Q28-Ig-9NP">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="yky-H4-cbk">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="yky-H4-cbk">
<rect key="frame" x="0.0" y="329.99999809265137" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yky-H4-cbk" id="Qga-yz-bXa">
@ -884,7 +894,7 @@
</constraints>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="GLY-Pk-gl9">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="GLY-Pk-gl9">
<rect key="frame" x="0.0" y="373.99999809265137" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="GLY-Pk-gl9" id="P7U-6w-pcx">
@ -912,6 +922,37 @@
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="Invite" id="dib-YA-Eiz">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="pth-Xm-NXb">
<rect key="frame" x="0.0" y="467.66666412353516" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pth-Xm-NXb" id="EmN-0E-Hpp">
<rect key="frame" x="0.0" y="0.0" width="428" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="Send Invitation Link" placeholder="Enter contact name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Rg7-YE-y8H">
<rect key="frame" x="20" y="0.0" width="388" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<textInputTraits key="textInputTraits"/>
</textField>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="FPK-6B-DCN">
<rect key="frame" x="378" y="12" width="20" height="20"/>
<color key="color" name="AddToContactsBar"/>
</activityIndicatorView>
</subviews>
<constraints>
<constraint firstItem="FPK-6B-DCN" firstAttribute="centerY" secondItem="EmN-0E-Hpp" secondAttribute="centerY" id="HlI-Sf-kPN"/>
<constraint firstItem="Rg7-YE-y8H" firstAttribute="leading" secondItem="EmN-0E-Hpp" secondAttribute="leadingMargin" id="Yid-O7-fNs"/>
<constraint firstItem="Rg7-YE-y8H" firstAttribute="top" secondItem="EmN-0E-Hpp" secondAttribute="top" id="hll-jG-K6h"/>
<constraint firstAttribute="trailingMargin" secondItem="Rg7-YE-y8H" secondAttribute="trailing" id="iO2-ER-q2P"/>
<constraint firstAttribute="trailingMargin" secondItem="FPK-6B-DCN" secondAttribute="trailing" constant="10" id="jQD-5E-6Ad"/>
<constraint firstAttribute="bottom" secondItem="Rg7-YE-y8H" secondAttribute="bottom" id="rnb-WT-t71"/>
</constraints>
</tableViewCellContentView>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="WDE-Vb-oKK" id="52x-2u-5zh"/>
@ -932,6 +973,7 @@
</navigationItem>
<connections>
<outlet property="accountTextField" destination="gXY-yq-Y2K" id="HAo-5R-FQQ"/>
<outlet property="invitationLinkIndicator" destination="FPK-6B-DCN" id="zl9-LQ-OPw"/>
<outlet property="jidTextField" destination="BM3-28-huR" id="rnA-hS-bcu"/>
<outlet property="nameTextField" destination="OGf-mX-8z3" id="tdd-eS-Ybc"/>
<outlet property="receivePresenceUpdatesSwitch" destination="QIs-qT-dLK" id="y20-Tc-yVK"/>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -485,9 +485,36 @@
<segue destination="FGQ-GL-dYt" kind="show" id="gsA-2D-Fg6"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="aboutSettingsViewCall" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="AboutSettingsViewCell" id="00j-hl-4km" userLabel="AboutSettingsViewCall">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="CallsSettingsViewCell" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="CallsSettingsViewCell" id="k4E-By-FcW">
<rect key="frame" x="0.0" y="445.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="k4E-By-FcW" id="u2g-bv-lyd">
<rect key="frame" x="0.0" y="0.0" width="384.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Calls" textAlignment="natural" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wfP-Tn-CDA">
<rect key="frame" x="20" y="11" width="356.5" height="22"/>
<accessibility key="accessibilityConfiguration" identifier="accountName"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="wfP-Tn-CDA" firstAttribute="leading" secondItem="u2g-bv-lyd" secondAttribute="leadingMargin" id="0bb-UP-oUQ"/>
<constraint firstAttribute="bottomMargin" secondItem="wfP-Tn-CDA" secondAttribute="bottom" id="7Ss-yP-q7l"/>
<constraint firstAttribute="trailingMargin" secondItem="wfP-Tn-CDA" secondAttribute="trailing" id="KAy-LK-qLI"/>
<constraint firstItem="wfP-Tn-CDA" firstAttribute="top" secondItem="u2g-bv-lyd" secondAttribute="topMargin" id="SJl-yF-XMB"/>
</constraints>
</tableViewCellContentView>
<accessibility key="accessibilityConfiguration" identifier="aboutSettingsViewCall"/>
<connections>
<segue destination="4VG-XN-BdZ" kind="show" id="9J1-2I-oGz"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="aboutSettingsViewCall" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="AboutSettingsViewCell" id="00j-hl-4km" userLabel="AboutSettingsViewCall">
<rect key="frame" x="0.0" y="489.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="00j-hl-4km" id="BKo-8a-1ti">
<rect key="frame" x="0.0" y="0.0" width="384.5" height="44"/>
<autoresizingMask key="autoresizingMask"/>
@ -1032,7 +1059,7 @@
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="BlockedContactTableViewCell" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="BlockedContactTableViewCell" textLabel="7tC-Eh-kK5" detailTextLabel="fB5-hb-x8m" style="IBUITableViewCellStyleSubtitle" id="mrW-yD-uKa">
<rect key="frame" x="0.0" y="24.5" width="414" height="55.5"/>
<rect key="frame" x="0.0" y="44.5" width="414" height="55.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mrW-yD-uKa" id="Ozm-Qg-ImQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="55.5"/>
@ -1056,7 +1083,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" restorationIdentifier="BlockedContactTableViewEmptyCell" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="BlockedContactTableViewEmptyCell" textLabel="Aki-gv-qus" style="IBUITableViewCellStyleDefault" id="ycT-Zz-uWc">
<rect key="frame" x="0.0" y="80" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="100" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ycT-Zz-uWc" id="rbP-vZ-Xsn">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@ -1136,7 +1163,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="h70-11-ntf" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2689" y="1685"/>
<point key="canvasLocation" x="2570" y="1797"/>
</scene>
<!--Experimental Settings Scene-->
<scene sceneID="4hq-he-9by">
@ -1319,7 +1346,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Tlr-f3-jiC" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1839" y="1742"/>
<point key="canvasLocation" x="1865" y="1797"/>
</scene>
<!--AboutController-->
<scene sceneID="5Mf-Za-3AY">
@ -1331,9 +1358,63 @@
</objects>
<point key="canvasLocation" x="2050" y="2202"/>
</scene>
<!--Calls settings-->
<scene sceneID="hhD-HQ-XQ1">
<objects>
<tableViewController title="Notification settings" id="4VG-XN-BdZ" userLabel="Calls settings" customClass="CallsSettingsViewController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="1sU-wb-PeQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="TELEPHONY" id="v8T-iN-1IT">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="AddToSystemCallHistoryCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="AddToSystemCallHistoryCell" id="I8r-iy-q2W" userLabel="AddToSystemCallHistoryCell">
<rect key="frame" x="0.0" y="49.5" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="I8r-iy-q2W" id="NJh-pm-678">
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add to system call history" textAlignment="natural" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ngk-vc-zET">
<rect key="frame" x="20" y="12" width="195.5" height="20.5"/>
<accessibility key="accessibilityConfiguration" identifier="accountName"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UL8-Yi-SF4">
<rect key="frame" x="345" y="6.5" width="51" height="31"/>
<connections>
<action selector="valueChanged:" destination="4VG-XN-BdZ" eventType="valueChanged" id="biy-dX-JX4"/>
</connections>
</switch>
</subviews>
<constraints>
<constraint firstAttribute="leadingMargin" secondItem="Ngk-vc-zET" secondAttribute="leading" id="AJa-Ff-gti"/>
<constraint firstItem="Ngk-vc-zET" firstAttribute="centerY" secondItem="NJh-pm-678" secondAttribute="centerY" id="OmK-Xl-nOm"/>
<constraint firstItem="UL8-Yi-SF4" firstAttribute="centerY" secondItem="NJh-pm-678" secondAttribute="centerY" id="SYD-ix-fy4"/>
<constraint firstItem="UL8-Yi-SF4" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Ngk-vc-zET" secondAttribute="trailing" constant="8" id="Xkk-ZF-rBn"/>
<constraint firstAttribute="trailingMargin" secondItem="UL8-Yi-SF4" secondAttribute="trailing" id="aFH-qx-7yp"/>
</constraints>
</tableViewCellContentView>
<accessibility key="accessibilityConfiguration" identifier="AddToSystemCallHistoryCell"/>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
</tableView>
<navigationItem key="navigationItem" id="b0W-ey-5kA"/>
<connections>
<outlet property="callsSwitch" destination="UL8-Yi-SF4" id="Z8U-Y8-fjZ"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="6ji-YQ-XOK" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="445" y="1797"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="TOL-19-lPZ"/>
<segue reference="cof-sd-KJv"/>
</inferredMetricsTieBreakers>
<resources>
<namedColor name="chatslistBackground">

View file

@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Video Call Controller-->
<scene sceneID="F1u-Sh-GDH">
<objects>
<viewController storyboardIdentifier="VideoCallController" modalPresentationStyle="fullScreen" useStoryboardIdentifierAsRestorationIdentifier="YES" id="sh6-q3-LhK" customClass="VideoCallController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="VideoCallController" modalPresentationStyle="overFullScreen" useStoryboardIdentifierAsRestorationIdentifier="YES" id="sh6-q3-LhK" customClass="VideoCallController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Y9t-qn-5HE" customClass="RTCMTLVideoView">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -822,6 +823,24 @@
</objects>
<point key="canvasLocation" x="61.682242990654203" y="-310.36717062634989"/>
</scene>
<!--Calls Account Selection Controller-->
<scene sceneID="XHS-ke-cDy">
<objects>
<tableViewController id="Kqh-v3-exI" customClass="CallsAccountSelectionController" customModule="Snikket" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" id="muR-BX-DTq">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<connections>
<outlet property="dataSource" destination="Kqh-v3-exI" id="Qt1-PG-wkI"/>
<outlet property="delegate" destination="Kqh-v3-exI" id="tmu-ry-rkW"/>
</connections>
</tableView>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="u2n-Tw-xqd" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1018" y="-290"/>
</scene>
</scenes>
<resources>
<image name="appLogo" width="1024" height="1024"/>
@ -834,5 +853,8 @@
<systemColor name="scrollViewTexturedBackgroundColor">
<color red="0.43529411764705878" green="0.44313725490196082" blue="0.47450980392156861" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View file

@ -58,6 +58,8 @@
<string>Used to save attachements from conversations</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to select avatar</string>
<key>NSUserActivityTypes</key>
<string>INStartCallIntent</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>

View file

@ -186,7 +186,7 @@ class NotificationCenterDelegate: NSObject, UNUserNotificationCenterDelegate {
let password = content.userInfo["password"] as? String;
let nick = AccountManager.getAccount(for: account)?.nickname ?? ""
let nick = AccountSettings.displayName(account).getString() ?? ""
joinMUC(account: account, channelJid: roomJid, componentType: .muc, nick: nick, password: password)
}

View file

@ -63,7 +63,7 @@ class ChannelJoinViewController: UITableViewController {
self.jidField.text = channelJid?.stringValue;
self.passwordField.text = password
if let account = self.account {
self.nicknameField.text = AccountManager.getAccount(for: account)?.nickname;
self.nicknameField.text = AccountSettings.displayName(account).getString()
}
switch action {

View file

@ -53,7 +53,7 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
override func viewDidLoad() {
let messageModule: MessageModule? = XmppService.instance.getClient(forJid: account)?.modulesManager.getModule(MessageModule.ID);
self.chat = messageModule?.chatManager.getChat(with: JID(self.jid), thread: nil) as? DBChat;
self.localNickname = AccountManager.getAccount(for: account)?.nickname ?? "Me";
self.localNickname = AccountSettings.displayName(account).getString() ?? "Me"
super.viewDidLoad()
@ -76,6 +76,31 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
}
}
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
// scrollViewShouldScrollToTop will not get called if tableview is already at top
guard var contentOffset = self.conversationLogController?.tableView.contentOffset else { return }
if contentOffset.y == 0 {
contentOffset.y = 1
self.conversationLogController?.tableView.setContentOffset(contentOffset, animated: true)
}
}
func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
scrollToTop()
return false
}
func scrollToTop() {
if let count = self.conversationLogController?.dataSource.count, count > 0 {
var currentRow = self.conversationLogController?.tableView.indexPathsForVisibleRows?.first?.row ?? 0
currentRow = count > currentRow + 40 ? currentRow + 40 : count
let indexPath = IndexPath(row: currentRow - 1, section: 0)
DispatchQueue.main.async {
self.conversationLogController?.tableView.scrollToRow(at: indexPath, at: .none, animated: true)
}
}
}
func setupViews() {
let recognizer = UITapGestureRecognizer(target: self, action: #selector(ChatViewController.showBuddyInfo));
self.titleView.isUserInteractionEnabled = true;
@ -97,7 +122,10 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
@IBAction func scrollToBottomTapped(_ sender: UIButton) {
self.conversationLogController?.tableView.setContentOffset(.zero, animated: true)
self.conversationLogController?.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .none, animated: true)
DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
self.conversationLogController?.tableView.setContentOffset(CGPoint(x: 0, y: 1), animated: true)
}
}
@IBAction func rejectSubscriptionTapped(_ sender: Any) {
@ -348,29 +376,38 @@ class ChatViewController : BaseChatViewControllerWithDataSourceAndContextMenuAnd
}
#if targetEnvironment(simulator)
#else
let jingleSupported = CallManager.isAvailable ? JingleManager.instance.support(for: JID(self.jid), on: self.account) : [];
var count = jingleSupported.contains(.audio) ? 1 : 0;
if jingleSupported.contains(.video) {
count = count + 1;
}
DispatchQueue.main.async {
guard (self.navigationItem.rightBarButtonItems?.count ?? 0 != count) else {
return;
}
var buttons: [UIBarButtonItem] = [];
if jingleSupported.contains(.video) {
//buttons.append(UIBarButtonItem(image: UIImage(named: "videoCall"), style: .plain, target: self, action: #selector(self.videoCall)));
buttons.append(self.smallBarButtonItem(image: UIImage(named: "videoCall")!, action: #selector(self.videoCall)));
}
if jingleSupported.contains(.audio) {
//buttons.append(UIBarButtonItem(image: UIImage(named: "audioCall"), style: .plain, target: self, action: #selector(self.audioCall)));
buttons.append(self.smallBarButtonItem(image: UIImage(named: "audioCall")!, action: #selector(self.audioCall)));
}
self.navigationItem.rightBarButtonItems = buttons;
let (oldAudio,oldVideo) = DBRosterStore.instance.getAudioVideoCallStatus(account: account, jid: jid)
// if both true no need to update it again
if oldAudio ?? false, oldVideo ?? false {
enableCallingBtns(supportsAudio: oldAudio ?? false, supportsVideo: oldVideo ?? false)
} else {
let jingleSupported = CallManager.isAvailable ? JingleManager.instance.support(for: JID(self.jid), on: self.account) : [];
let supportsAudio = jingleSupported.contains(.audio) ? 1 : (oldAudio == true ? 1 : 0) // do not set false if previous value was true
let supportsVideo = jingleSupported.contains(.video) ? 1 : (oldVideo == true ? 1 : 0)
DBRosterStore.instance.updateAudioVideoCallStatus(account: account, jid: jid, audioCall: supportsAudio, videoCall: supportsVideo)
let (audio,video) = DBRosterStore.instance.getAudioVideoCallStatus(account: account, jid: jid)
enableCallingBtns(supportsAudio: audio ?? false, supportsVideo: video ?? false)
}
#endif
}
func enableCallingBtns(supportsAudio: Bool, supportsVideo: Bool) {
DispatchQueue.main.async {
var buttons: [UIBarButtonItem] = []
if supportsVideo {
buttons.append(self.smallBarButtonItem(image: UIImage(named: "videoCall")!, action: #selector(self.videoCall)))
}
if supportsAudio {
buttons.append(self.smallBarButtonItem(image: UIImage(named: "audioCall")!, action: #selector(self.audioCall)))
}
self.navigationItem.rightBarButtonItems = buttons
}
}
fileprivate func smallBarButtonItem(image: UIImage, action: Selector) -> UIBarButtonItem {
let btn = UIButton(type: .custom);
btn.setImage(image, for: .normal);

View file

@ -45,7 +45,7 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
tableView.rowHeight = UITableView.automaticDimension;
tableView.estimatedRowHeight = 160.0;
tableView.separatorStyle = .none;
tableView.scrollsToTop = false
tableView.scrollsToTop = true
tableView.transform = dataSource.inverted ? CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: 0) : CGAffineTransform.identity;
if let refreshControl = self.refreshControl {
@ -72,6 +72,9 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
} else {
self.toggleNoMessagesLabel(show: false)
}
DispatchQueue.main.async {
self.tableView.setContentOffset(CGPoint(x: 0, y: 1), animated: false)
}
}
}
}
@ -87,7 +90,10 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
label.sizeToFit()
self.tableView.backgroundView = label
} else {
self.tableView.backgroundView = nil
DispatchQueue.main.async {
self.tableView.backgroundView = nil
}
}
}
@ -95,6 +101,9 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
guard rows.count > 0 else {
return;
}
if shouldScroll, tableView.contentOffset.y == 1 {
tableView.setContentOffset(.zero, animated: false)
}
if dataSource.count == rows.count && rows.count > 1 {
tableView.reloadData();
} else {
@ -105,8 +114,12 @@ class ConversationLogController: UIViewController, ChatViewDataSourceDelegate {
}
if shouldScroll && rows.contains(0) && (tableView.indexPathsForVisibleRows?.contains(firstRowIndexPath) ?? false) {
print("added items at:", rows, "scrolling to:", firstRowIndexPath);
tableView.scrollToRow(at: firstRowIndexPath, at: .none, animated: true)
tableView.scrollToRow(at: firstRowIndexPath, at: .bottom, animated: true)
DispatchQueue.main.asyncAfter(deadline: .now()+0.2) {
self.tableView.setContentOffset(CGPoint(x: 0, y: 1), animated: false)
}
}
toggleNoMessagesLabel(show: false)
markAsReadUpToNewestVisibleRow();
}

View file

@ -53,4 +53,9 @@ class ChatsListTableViewCell: UITableViewCell {
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
avatarStatusView.statusImageView.isHidden = true
}
}

View file

@ -102,33 +102,28 @@ class ChatsListViewController: UITableViewController {
// cell.nameLabel.textColor = Appearance.current.labelColor;
cell.nameLabel.font = item.unread > 0 ? UIFont.boldSystemFont(ofSize: cell.nameLabel.font.pointSize) : UIFont.systemFont(ofSize: cell.nameLabel.font.pointSize);
// cell.lastMessageLabel.textColor = item.unread > 0 ? Appearance.current.labelColor : Appearance.current.secondaryLabelColor;
let xmppClient = self.xmppService.getClient(forJid: item.account);
switch item {
case let room as DBRoom:
let memberNames = self.groupMemberNames(item: item)
let memberImages = self.groupMemberAvatars(item: item)
let memberBareJIDS = self.groupMembersJIDS(item: item)
cell.avatarStatusView.setGroup(bareJIDS: memberBareJIDS, memberNames: memberNames,memberImages: memberImages, groupAvatar: AvatarManager.instance.avatar(for: room.roomJid, on: room.account), defAvatar: AvatarManager.instance.defaultGroupchatAvatar)
cell.avatarStatusView.setStatus(room.state == .joined ? Presence.Show.online : nil);
cell.nameLabel.text = groupName(item: item)
case let channel as DBChannel:
cell.avatarStatusView.set(name: nil, avatar: AvatarManager.instance.avatar(for: channel.channelJid, on: channel.account), orDefault: AvatarManager.instance.defaultGroupchatAvatar);
cell.nameLabel.text = channel.name ?? item.jid.localPart ?? item.jid.stringValue;
cell.avatarStatusView.setStatus(channel.state == .joined ? Presence.Show.online : nil)
default:
let name = PEPDisplayNameModule.getDisplayName(account: item.account, for: BareJID(item.jid))
cell.nameLabel.text = name
cell.avatarStatusView.set(bareJID: item.jid.bareJid ,name: name, avatar: AvatarManager.instance.avatar(for: item.jid.bareJid, on: item.account), orDefault: AvatarManager.instance.defaultAvatar);
let presenceModule: PresenceModule? = xmppClient?.modulesManager.getModule(PresenceModule.ID);
let presence = presenceModule?.presenceStore.getBestPresence(for: item.jid.bareJid);
cell.avatarStatusView.setStatus(presence?.show);
}
if let lastActivity = item.lastActivity {
switch lastActivity {
case .message(let lastMessage, let direction, let sender):
if lastMessage.starts(with: "/me ") {
let nick = sender ?? (direction == .incoming ? (cell.nameLabel.text ?? "") : (AccountManager.getAccount(for: item.account)?.nickname ?? "Me"));
let nick = sender ?? (direction == .incoming ? (cell.nameLabel.text ?? "") : AccountSettings.displayName(item.account).getString() ?? "Me");
var fontDescriptor = UIFont.systemFont(ofSize: cell.lastMessageLabel.font.pointSize, weight: item.unread > 0 ? .medium : .regular).fontDescriptor.withSymbolicTraits(.traitItalic) ?? UIFont.systemFont(ofSize: cell.lastMessageLabel.font.pointSize, weight: item.unread > 0 ? .medium : .regular).fontDescriptor;
let msg = NSMutableAttributedString(string: "\(nick) ", attributes: [.font: UIFont(descriptor: fontDescriptor, size: 0)]);
fontDescriptor = UIFont.systemFont(ofSize: cell.lastMessageLabel.font.pointSize, weight: item.unread > 0 ? .regular : .light).fontDescriptor.withSymbolicTraits(.traitItalic) ?? UIFont.systemFont(ofSize: cell.lastMessageLabel.font.pointSize, weight: item.unread > 0 ? .medium : .regular).fontDescriptor;
@ -203,8 +198,6 @@ class ChatsListViewController: UITableViewController {
// cell.timestampLabel.textColor = Appearance.current.secondaryLabelColor;
}
cell.avatarStatusView.updateCornerRadius();
return cell;
}
@ -422,7 +415,9 @@ class ChatsListViewController: UITableViewController {
if let name = room.name {
return name
} else {
guard let jids = room.members else { return "" }
guard let jids = room.members else {
return room.jid.stringValue
}
var name = ""
for (index,memberJid) in jids.enumerated() {

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "add email";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Nickname";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Country";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO fingerprints";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "When in Away/XA/DND state";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "add phone";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detail";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Street";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Enable automatic message synchronization";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Encryption";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Enter default nickname to use in chats";
/* No comment provided by engineer. */
"Enter message to send to:" = "Enter message to send to:";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Fingerprint of this device";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Free for chat";
@ -317,9 +308,6 @@
/* No comment provided by engineer. */
"New public group chat" = "New public group chat";
/* No comment provided by engineer. */
"Nickname" = "Nickname";
/* No comment provided by engineer. */
"No" = "No";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "No messages yet. Say hi!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* No comment provided by engineer. */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Phones";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Please try again!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Search channels";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Select photo";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "The user will be reported and any calls, messages and status updates from them will be blocked.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Video call";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Warning";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Message Archiving";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Back";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "About";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Account name";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blocked contacts";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Hidden\" group";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Contacts settings";

View file

@ -123,6 +123,9 @@ open class DBRosterStore: RosterCacheProvider {
fileprivate let updateNicknameStmt: DBStatement
fileprivate let getNicknameStmt: DBStatement
fileprivate let updateAudioVideoCallStmt: DBStatement
fileprivate let getAudioVideoCallStmt: DBStatement
public init() {
self.dispatcher = QueueDispatcher(label: "db_roster_store");
@ -141,6 +144,9 @@ open class DBRosterStore: RosterCacheProvider {
updateNicknameStmt = try! DBConnection.main.prepareStatement("UPDATE roster_items SET nickname = :nickname WHERE jid = :jid")
getNicknameStmt = try! DBConnection.main.prepareStatement("SELECT nickname FROM roster_items WHERE jid = :jid")
updateAudioVideoCallStmt = try! DBConnection.main.prepareStatement("UPDATE roster_items SET audio_call = :audioCall, video_call = :videoCall WHERE account = :account AND jid = :jid")
getAudioVideoCallStmt = try! DBConnection.main.prepareStatement("SELECT audio_call, video_call FROM roster_items WHERE account = :account AND jid = :jid")
NotificationCenter.default.addObserver(self, selector: #selector(DBRosterStore.accountRemoved), name: NSNotification.Name(rawValue: "accountRemoved"), object: nil);
}
@ -160,6 +166,34 @@ open class DBRosterStore: RosterCacheProvider {
}
}
func updateAudioVideoCallStatus(account: BareJID, jid: BareJID, audioCall: Int?, videoCall: Int?) {
return dispatcher.sync {
let params: [String: Any?] = ["account":account,
"jid":jid,
"audioCall":audioCall,
"videoCall":videoCall]
_ = try! self.updateAudioVideoCallStmt.update(params)
}
}
func getAudioVideoCallStatus(account: BareJID, jid: BareJID) -> (audio:Bool?, video:Bool?) {
dispatcher.sync {
let params: [String: Any?] = ["account":account,
"jid":jid]
var audioCall: Bool? = nil
var videoCall: Bool? = nil
try! getAudioVideoCallStmt.queryFirstMatching(params) { cursor in
let audio: Int? = cursor["audio_call"]
let video: Int? = cursor["video_call"]
audioCall = audio == 1 ? true : (audio == 0 ? false : nil)
videoCall = video == 1 ? true : (video == 0 ? false : nil)
}
return (audioCall,videoCall)
}
}
func getAll(for account: BareJID) -> [DBRosterItem] {
return dispatcher.sync {
let params: [String: Any?] = ["account": account];

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "add email";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Nickname";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Country";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO fingerprints";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "When in Away/XA/DND state";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "add phone";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detail";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Street";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Enable automatic message synchronization";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Encryption";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Enter default nickname to use in chats";
/* No comment provided by engineer. */
"Enter message to send to:" = "Enter message to send to:";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Fingerprint of this device";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Free for chat";
@ -318,10 +309,7 @@
"New public group chat" = "New public group chat";
/* No comment provided by engineer. */
"Nickname" = "Nickname";
/* No comment provided by engineer. */
"No" = "No";
"No" = "Nein";
/* No comment provided by engineer. */
"No attachments" = "No attachments";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "No messages yet. Say hi!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* No comment provided by engineer. */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Phones";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Please try again!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Search channels";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Select photo";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "The user will be reported and any calls, messages and status updates from them will be blocked.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Video call";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Warning";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Message Archiving";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Back";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "About";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Account name";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blocked contacts";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Hidden\" group";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Contacts settings";

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "add email";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Nickname";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Country";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO fingerprints";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "When in Away/XA/DND state";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "add phone";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detail";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Street";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Enable automatic message synchronization";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Encryption";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Enter default nickname to use in chats";
/* No comment provided by engineer. */
"Enter message to send to:" = "Enter message to send to:";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Fingerprint of this device";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Free for chat";
@ -317,9 +308,6 @@
/* No comment provided by engineer. */
"New public group chat" = "New public group chat";
/* No comment provided by engineer. */
"Nickname" = "Nickname";
/* No comment provided by engineer. */
"No" = "No";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "No messages yet. Say hi!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* No comment provided by engineer. */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Phones";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Please try again!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Search channels";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Select photo";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "The user will be reported and any calls, messages and status updates from them will be blocked.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Video call";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Warning";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Message Archiving";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Back";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "About";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Account name";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blocked contacts";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Hidden\" group";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Contacts settings";

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "add email";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Nickname";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Country";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO fingerprints";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "When in Away/XA/DND state";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "add phone";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detail";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Street";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Enable automatic message synchronization";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Encryption";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Enter default nickname to use in chats";
/* No comment provided by engineer. */
"Enter message to send to:" = "Enter message to send to:";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Fingerprint of this device";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Free for chat";
@ -317,9 +308,6 @@
/* No comment provided by engineer. */
"New public group chat" = "New public group chat";
/* No comment provided by engineer. */
"Nickname" = "Nickname";
/* No comment provided by engineer. */
"No" = "No";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "No messages yet. Say hi!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* No comment provided by engineer. */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Phones";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Please try again!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Search channels";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Select photo";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "The user will be reported and any calls, messages and status updates from them will be blocked.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Video call";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Warning";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Message Archiving";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Back";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "About";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Account name";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blocked contacts";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Hidden\" group";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Contacts settings";

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "add email";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Nickname";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Country";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO fingerprints";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "When in Away/XA/DND state";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "add phone";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detail";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Street";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Activer la synchronisation automatique des messages";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Chiffrement";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Entrez le pseudonyme à utiliser par défaut dans les discussions";
/* No comment provided by engineer. */
"Enter message to send to:" = "Entrer un message à envoyer à :";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Empreinte de ce client";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Disponible pour discuter";
@ -317,9 +308,6 @@
/* No comment provided by engineer. */
"New public group chat" = "Nouveau salon public";
/* No comment provided by engineer. */
"Nickname" = "Pseudonyme";
/* No comment provided by engineer. */
"No" = "Non";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "Aucun message, dites bonjour!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* Encryption mode */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Téléphones";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Merci de réessayer!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Recherche de salons";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Sélectionner une photo";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "The user will be reported and any calls, messages and status updates from them will be blocked.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Appel vidéo";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Attention";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Message Archiving";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Back";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "About";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Account name";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blocked contacts";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Hidden\" group";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Contacts settings";

View file

@ -102,14 +102,45 @@ class MucChatViewController: BaseChatViewControllerWithDataSourceAndContextMenuA
}
@IBAction func scrollToBottomTapped(_ sender: RoundShadowButton) {
self.conversationLogController?.tableView.setContentOffset(.zero, animated: true)
self.conversationLogController?.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .none, animated: true)
DispatchQueue.main.asyncAfter(deadline: .now()+0.5) {
self.conversationLogController?.tableView.setContentOffset(CGPoint(x: 0, y: 1), animated: true)
}
}
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
// scrollViewShouldScrollToTop will not get called if tableview is already at top
guard var contentOffset = self.conversationLogController?.tableView.contentOffset else { return }
if contentOffset.y == 0 {
contentOffset.y = 1
self.conversationLogController?.tableView.setContentOffset(contentOffset, animated: true)
}
}
func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
scrollToTop()
return false
}
func scrollToTop() {
if let count = self.conversationLogController?.dataSource.count, count > 0 {
var currentRow = self.conversationLogController?.tableView.indexPathsForVisibleRows?.first?.row ?? 0
currentRow = count > currentRow + 40 ? currentRow + 40 : count
let indexPath = IndexPath(row: currentRow - 1, section: 0)
DispatchQueue.main.async {
self.conversationLogController?.tableView.scrollToRow(at: indexPath, at: .none, animated: true)
}
}
}
func setupGroupName() {
if let name = room?.name {
titleView?.name = name
} else {
guard let jids = room?.members else { return }
guard let jids = room?.members else {
titleView?.name = room?.jid.stringValue
return
}
var name = ""
for (index,memberJid) in jids.enumerated() {

View file

@ -111,7 +111,6 @@ class AbstractRosterViewController: UITableViewController, UISearchResultsUpdati
if let item = roster?.item(at: indexPath) {
cell.nameLabel.text = item.displayName;
cell.statusLabel.text = item.account.stringValue;
cell.avatarStatusView.setStatus(item.presence?.show);
cell.avatarStatusView.set(name: item.displayName, avatar: AvatarManager.instance.avatar(for: item.jid.bareJid, on: item.account), orDefault: AvatarManager.instance.defaultAvatar);
}

View file

@ -26,6 +26,7 @@ class RosterItemEditViewController: UITableViewController, UIPickerViewDataSourc
var xmppService:XmppService!
@IBOutlet weak var invitationLinkIndicator: UIActivityIndicatorView!
@IBOutlet var accountTextField: UITextField!
@IBOutlet var jidTextField: UITextField!
@IBOutlet var nameTextField: UITextField!
@ -69,6 +70,45 @@ class RosterItemEditViewController: UITableViewController, UIPickerViewDataSourc
self.nameTextField.text = nil;
}
}
func createInvitationLink() {
guard let account = BareJID(self.accountTextField.text), let client = xmppService.getClient(for: account) else { return }
let inviteCommand = "urn:xmpp:invite#invite"
if let adHocModule: AdHocCommandsModule = client.modulesManager.getModule(AdHocCommandsModule.ID) {
adHocModule.execute(on: JID(account.domain), command: inviteCommand, action: .execute, data: nil) { response, data in
if let inviteLink = data?.getField(named: "landing-url")?.element.findChild(name: "value")?.value {
self.presentShareSheet(url: inviteLink)
}
} onError: { error in
self.toggleActivityIndicator(toggle: false)
}
}
}
func presentShareSheet(url: String) {
guard let url = URL(string: url) else {
self.toggleActivityIndicator(toggle: false)
return
}
let items: [Any] = [url]
let ac = UIActivityViewController(activityItems: items, applicationActivities: nil)
DispatchQueue.main.async {
self.present(ac, animated: true) {
self.toggleActivityIndicator(toggle: false)
}
}
}
func toggleActivityIndicator(toggle: Bool) {
DispatchQueue.main.async {
if toggle { self.invitationLinkIndicator.startAnimating() }
else {self.invitationLinkIndicator.stopAnimating() }
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
@ -217,6 +257,13 @@ class RosterItemEditViewController: UITableViewController, UIPickerViewDataSourc
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
self.accountTextField.text = self.pickerView(pickerView, titleForRow: row, forComponent: component);
self.view.endEditing(true)
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.section == 4, indexPath.row == 0, !invitationLinkIndicator.isAnimating {
toggleActivityIndicator(toggle: true)
self.createInvitationLink()
}
}
}

View file

@ -45,6 +45,7 @@ class RosterItemTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
avatarStatusView.statusImageView.isHidden = true
}
override func setSelected(_ selected: Bool, animated: Bool) {

View file

@ -44,6 +44,8 @@ class RosterViewController: AbstractRosterViewController, UIGestureRecognizerDel
setColors();
updateNavBarColors();
tableView.rowHeight = UITableView.automaticDimension;
tableView.estimatedRowHeight = 66.0;
NotificationCenter.default.addObserver(self, selector: #selector(settingsChanged(_:)), name: Settings.SETTINGS_CHANGED, object: nil);
NotificationCenter.default.addObserver(self, selector: #selector(self.nickChanged(_:)), name: NickChangeEventHandler.NICK_CHANGED, object: nil)
@ -137,10 +139,8 @@ class RosterViewController: AbstractRosterViewController, UIGestureRecognizerDel
let nick = PEPDisplayNameModule.getDisplayName(account: item.account, for: item.jid.bareJid)
cell.nameLabel.text = nick
cell.statusLabel.text = item.presence?.status ?? item.jid.stringValue;
cell.avatarStatusView.setStatus(item.presence?.show);
cell.avatarStatusView.set(bareJID: item.jid.bareJid, name: nick, avatar: AvatarManager.instance.avatar(for: item.jid.bareJid, on: item.account), orDefault: AvatarManager.instance.defaultAvatar);
}
return cell;
}
@ -315,13 +315,23 @@ class RosterViewController: AbstractRosterViewController, UIGestureRecognizerDel
];
#if targetEnvironment(simulator)
#else
let jingleSupport = JingleManager.instance.support(for: item.jid, on: item.account);
if jingleSupport.contains(.audio) && jingleSupport.contains(.video) {
let (oldAudio,oldVideo) = DBRosterStore.instance.getAudioVideoCallStatus(account: item.account, jid: item.jid.bareJid)
if let oldAudio = oldAudio, let oldVideo = oldVideo, !oldVideo, !oldAudio {
let jingleSupport = JingleManager.instance.support(for: item.jid, on: item.account);
let supportsAudio = jingleSupport.contains(.audio) ? 1 : (oldAudio == true ? 1 : 0) // do not set false if previous value was true
let supportsVideo = jingleSupport.contains(.video) ? 1 : (oldVideo == true ? 1 : 0)
DBRosterStore.instance.updateAudioVideoCallStatus(account: item.account, jid: item.jid.bareJid, audioCall: supportsAudio, videoCall: supportsVideo)
}
let (audio,video) = DBRosterStore.instance.getAudioVideoCallStatus(account: item.account, jid: item.jid.bareJid)
if (audio ?? false) && (video ?? false) {
items.append(UIAction(title: NSLocalizedString("Video call", comment: ""), image: UIImage(systemName: "video"), handler: { (action) in
VideoCallController.call(jid: item.jid.bareJid, from: item.account, media: [.audio, .video], sender: self);
}));
}
if jingleSupport.contains(.audio) {
if audio ?? false {
items.append(UIAction(title: NSLocalizedString("Audio call", comment: ""), image: UIImage(systemName: "phone"), handler: { (action) in
VideoCallController.call(jid: item.jid.bareJid, from: item.account, media: [.audio], sender: self);
}));

View file

@ -154,7 +154,7 @@ class MessageEventHandler: XmppServiceEventHandler {
return;
}
let encryption = encrypted ?? chat.options.encryption ?? ChatEncryption(rawValue: Settings.messageEncryption.string()!)!;
var encryption = encrypted ?? chat.options.encryption ?? ChatEncryption(rawValue: Settings.messageEncryption.string()!)!;
let message = chat.createMessage(msg);
message.id = stanzaId ?? UUID().uuidString;
@ -163,6 +163,11 @@ class MessageEventHandler: XmppServiceEventHandler {
let account = chat.account;
let jid = chat.jid.bareJid;
// chat.options.encryption == nil means it is set to defualt
if let telephonyProvider = AccountSettings.telephonyProvider(account).getString(), jid.domain.lowercased() == telephonyProvider.lowercased(), (chat.options.encryption == nil || chat.options.encryption == ChatEncryption.none) {
encryption = ChatEncryption.none
}
switch encryption {
case .omemo:

View file

@ -482,7 +482,7 @@ open class XmppService: Logger, EventHandler {
}
fileprivate func fetchEnded(for account: BareJID) {
dispatcher.async {
dispatcher.async(flags: .barrier) {
if let idx = self.fetchingFor.firstIndex(of: account) {
self.fetchingFor.remove(at: idx);
self.fetchGroup?.leave();

View file

@ -32,8 +32,6 @@ class AccountSettingsViewController: UITableViewController {
@IBOutlet var addressTextView: UILabel!
@IBOutlet var enabledSwitch: UISwitch!
@IBOutlet var nicknameLabel: UILabel!;
@IBOutlet var pushNotificationsForAwaySwitch: UISwitch!
@IBOutlet weak var telephonyProviderLabel: UILabel!
@ -54,8 +52,6 @@ class AccountSettingsViewController: UITableViewController {
let config = AccountManager.getAccount(for: account);
enabledSwitch.isOn = config?.active ?? false;
nicknameLabel.text = config?.nickname;
pushNotificationsForAwaySwitch.isOn = AccountSettings.PushNotificationsForAway(account).getBool();
updateView();
@ -106,21 +102,6 @@ class AccountSettingsViewController: UITableViewController {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: false);
if indexPath.section == 1 && indexPath.row == 3 {
let controller = UIAlertController(title: NSLocalizedString("Nickname",comment: ""), message: NSLocalizedString("Enter default nickname to use in chats",comment: ""), preferredStyle: .alert);
controller.addTextField(configurationHandler: { textField in
textField.text = AccountManager.getAccount(for: self.account)?.nickname ?? "";
});
controller.addAction(UIAlertAction(title: NSLocalizedString("OK",comment: ""), style: .default, handler: { _ in
let nickname = controller.textFields?.first?.text?.trimmingCharacters(in: .whitespacesAndNewlines);
if let account = AccountManager.getAccount(for: self.account) {
account.nickname = nickname;
AccountManager.save(account: account);
self.nicknameLabel.text = account.nickname;
}
}))
self.navigationController?.present(controller, animated: true, completion: nil);
}
if indexPath.section == 5 && indexPath.row == 0 {
self.logOutSheet(indexPath: indexPath)
@ -152,9 +133,6 @@ class AccountSettingsViewController: UITableViewController {
}
func updateView() {
let client = XmppService.instance.getClient(for: account);
let pushModule: SiskinPushNotificationsModule? = client?.modulesManager.getModule(SiskinPushNotificationsModule.ID);
pushNotificationsForAwaySwitch.isEnabled = (pushModule?.isSupported(extension: TigasePushNotificationsModule.PushForAway.self) ?? false);
telephonyProviderLabel.text = AccountSettings.telephonyProvider(account).getString() ?? "None"
}
@ -241,59 +219,14 @@ class AccountSettingsViewController: UITableViewController {
}
break
case .failure(let errorCondition):
DispatchQueue.main.async {
self.pushNotificationsForAwaySwitch.isOn = false;
}
onError(errorCondition);
}
});
} else {
pushNotificationsForAwaySwitch.isOn = false;
onError(ErrorCondition.service_unavailable);
}
}
@IBAction func pushNotificationsForAwaySwitchChangedValue(_ sender: Any) {
AccountSettings.PushNotificationsForAway(account).set(bool: self.pushNotificationsForAwaySwitch.isOn);
guard let pushModule: SiskinPushNotificationsModule = XmppService.instance.getClient(for: account)?.modulesManager.getModule(SiskinPushNotificationsModule.ID) else {
return;
}
guard let pushSettings = pushModule.pushSettings else {
return;
}
pushModule.reenable(pushSettings: pushSettings, completionHandler: { (result) in
switch result {
case .success(_):
print("PUSH enabled!");
DispatchQueue.main.async {
guard self.pushNotificationsForAwaySwitch.isOn else {
return;
}
let syncPeriod = AccountSettings.messageSyncPeriod(self.account).getDouble();
if !AccountSettings.messageSyncAuto(self.account).getBool() || syncPeriod < 12 {
let alert = UIAlertController(title: NSLocalizedString("Enable automatic message synchronization",comment: ""), message: NSLocalizedString("For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?",comment: ""), preferredStyle: .alert);
alert.addAction(UIAlertAction(title: NSLocalizedString("No",comment: ""), style: .cancel, handler: nil));
alert.addAction(UIAlertAction(title: NSLocalizedString("Yes",comment: ""), style: .default, handler: {(action) in
AccountSettings.messageSyncAuto(self.account).set(bool: true);
if (syncPeriod < 12) {
AccountSettings.messageSyncPeriod(self.account).set(double: 12.0);
}
self.updateView();
}));
self.present(alert, animated: true, completion: nil);
}
}
case .failure(_):
DispatchQueue.main.async {
self.pushNotificationsForAwaySwitch.isOn = !self.pushNotificationsForAwaySwitch.isOn;
AccountSettings.PushNotificationsForAway(self.account).set(bool: self.pushNotificationsForAwaySwitch.isOn);
}
}
});
}
func setPushNotificationsEnabled(forJid account: BareJID, value: Bool) {
if let config = AccountManager.getAccount(for: account) {
config.pushNotifications = value
@ -419,11 +352,16 @@ class AccountSettingsViewController: UITableViewController {
}
func disablePushNotifications(completion: @escaping (Bool) -> Void) {
guard let account = self.account, let config = AccountManager.getAccount(for: account), let pushSettings = config.pushSettings else {
guard let account = self.account, let config = AccountManager.getAccount(for: account) else {
completion(false)
return
}
guard let pushSettings = config.pushSettings else {
completion(true)
return
}
if let client = XmppService.instance.getClient(forJid: BareJID(account)), client.state == .connected, let pushModule: SiskinPushNotificationsModule = client.modulesManager.getModule(SiskinPushNotificationsModule.ID) {
pushModule.unregisterDeviceAndDisable(completionHandler: { result in
switch result {

View file

@ -0,0 +1,53 @@
//
// CallsSettingsViewController.swift
// Snikket
//
// Created by Muhammad Khalid on 29/10/2021.
// Copyright © 2021 Snikket. All rights reserved.
//
import UIKit
import CallKit
class CallsSettingsViewController: UITableViewController {
@IBOutlet weak var callsSwitch: UISwitch!
override func viewDidLoad() {
super.viewDidLoad()
callsSwitch.isOn = Settings.addCallsToSystem.getBool()
}
// MARK: - Table view data source
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
@IBAction func valueChanged(_ sender: UISwitch) {
Settings.addCallsToSystem.setValue(sender.isOn)
enableAddCallsToSystem(enable: sender.isOn)
}
func enableAddCallsToSystem(enable: Bool) {
let config = CXProviderConfiguration(localizedName: "Snikket");
if #available(iOS 13.0, *) {
if let image = UIImage(systemName: "message.fill") {
config.iconTemplateImageData = image.pngData();
}
} else {
if let image = UIImage(named: "message.fill") {
config.iconTemplateImageData = image.pngData();
}
}
config.includesCallsInRecents = enable;
config.supportsVideo = true;
config.maximumCallsPerCallGroup = 1;
config.maximumCallGroups = 1;
config.supportedHandleTypes = [.generic];
CallManager.instance?.provider = CXProvider(configuration: config);
CallManager.instance?.provider.setDelegate(CallManager.instance, queue: nil)
}
}

View file

@ -170,6 +170,9 @@ class SettingsViewController: UITableViewController {
let cell = tableView.dequeueReusableCell(withIdentifier: "ExperimentalSettingsViewCell", for: indexPath);
cell.accessoryType = .disclosureIndicator;
return cell;
case .calls:
let cell = tableView.dequeueReusableCell(withIdentifier: "CallsSettingsViewCell", for: indexPath)
return cell
case .about:
let cell = tableView.dequeueReusableCell(withIdentifier: "AboutSettingsViewCell", for: indexPath);
return cell;
@ -396,13 +399,14 @@ class SettingsViewController: UITableViewController {
case notifications
case media
case experimental
case calls
case about
static let groups: [SettingsGroup] = {
if #available(iOS 13.0, *) {
return [.appearance, .chat, .contacts, .media, .about]
return [.appearance, .chat, .contacts, .media, .calls, .about]
} else {
return [.chat, .contacts, .media, .about]
return [.chat, .contacts, .media, .calls, .about]
}
}()
}

View file

@ -1,9 +1,6 @@
/* Class = "UILabel"; text = "add email"; ObjectID = "06Y-Cg-0Q3"; */
"06Y-Cg-0Q3.text" = "lägg till epost";
/* Class = "UILabel"; text = "Nickname"; ObjectID = "27D-rn-4zp"; */
"27D-rn-4zp.text" = "Visningsnamn";
/* Class = "UITextField"; placeholder = "Country"; ObjectID = "4hs-GL-9fd"; */
"4hs-GL-9fd.placeholder" = "Land";
@ -19,9 +16,6 @@
/* Class = "UITableViewController"; title = "OMEMO fingerprints"; ObjectID = "A24-eF-tzh"; */
"A24-eF-tzh.title" = "OMEMO-fingeravtryck";
/* Class = "UILabel"; text = "When in Away/XA/DND state"; ObjectID = "aKW-CM-bl2"; */
"aKW-CM-bl2.text" = "I Borta/Stör ej-läge";
/* Class = "UILabel"; text = "John Doe"; ObjectID = "bDD-UG-Fxr"; */
"bDD-UG-Fxr.text" = "John Doe";
@ -67,9 +61,6 @@
/* Class = "UILabel"; text = "add phone"; ObjectID = "jAE-vq-Vfj"; */
"jAE-vq-Vfj.text" = "lägg till telefon";
/* Class = "UILabel"; text = "Detail"; ObjectID = "JkB-3h-A61"; */
"JkB-3h-A61.text" = "Detalj";
/* Class = "UITextField"; placeholder = "Street"; ObjectID = "KgL-GY-IFp"; */
"KgL-GY-IFp.placeholder" = "Gata";

View file

@ -170,18 +170,12 @@
/* No comment provided by engineer. */
"Enable %@" = "Enable %@";
/* No comment provided by engineer. */
"Enable automatic message synchronization" = "Enable automatic message synchronization";
/* No comment provided by engineer. */
"Enable telephony provider?" = "Enable telephony provider?";
/* No comment provided by engineer. */
"Encryption" = "Kryptering";
/* No comment provided by engineer. */
"Enter default nickname to use in chats" = "Ange visningsnamn att använda i chattar";
/* No comment provided by engineer. */
"Enter message to send to:" = "Enter message to send to:";
@ -209,9 +203,6 @@
/* No comment provided by engineer. */
"Fingerprint of this device" = "Den här enhetens fingeravtryck";
/* No comment provided by engineer. */
"For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?" = "For best experience it is suggested to enable Message Archving with automatic message synchronization of at least last 12 hours.\nDo you wish to do this now?";
/* No comment provided by engineer. */
"Free for chat" = "Free for chat";
@ -317,9 +308,6 @@
/* No comment provided by engineer. */
"New public group chat" = "Ny publik gruppchatt";
/* No comment provided by engineer. */
"Nickname" = "Visningsnamn";
/* No comment provided by engineer. */
"No" = "No";
@ -329,6 +317,9 @@
/* No comment provided by engineer. */
"No messages yet. Say hi!" = "Inga meddelanden än. Säg hej!";
/* No comment provided by engineer. */
"No Telephony Provider!" = "No Telephony Provider!";
/* Encryption mode */
"None" = "None";
@ -377,6 +368,9 @@
/* No comment provided by engineer. */
"Phones" = "Telefoner";
/* No comment provided by engineer. */
"Please Select a Telephony Provider from Settings" = "Please Select a Telephony Provider from Settings";
/* No comment provided by engineer. */
"Please try again!" = "Vänligen försök igen!";
@ -452,6 +446,9 @@
/* No comment provided by engineer. */
"Search channels" = "Sök efter kanaler";
/* No comment provided by engineer. */
"Select Account for Call" = "Select Account for Call";
/* No comment provided by engineer. */
"Select photo" = "Välj foto";
@ -515,6 +512,9 @@
/* No comment provided by engineer. */
"The user will be reported and any calls, messages and status updates from them will be blocked." = "Användaren kommer rapporteras och samtal, meddelanden och statusuppdateringar från dem blockeras.";
/* No comment provided by engineer. */
"This is an audio call, and no video is available" = "This is an audio call, and no video is available";
/* No comment provided by engineer. */
"This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages" = "This room is not capable of sending encrypted messages. Please change encryption settings to be able to send messages";
@ -542,6 +542,9 @@
/* No comment provided by engineer. */
"Video call" = "Videosamtal";
/* No comment provided by engineer. */
"Video not available" = "Video not available";
/* No comment provided by engineer. */
"Warning" = "Varning";

View file

@ -22,6 +22,9 @@
/* Class = "UILabel"; text = "Message Archiving"; ObjectID = "Ckp-Mb-v0c"; */
"Ckp-Mb-v0c.text" = "Meddelandearkivering";
/* Class = "UITableViewSection"; headerTitle = "Invite"; ObjectID = "dib-YA-Eiz"; */
"dib-YA-Eiz.headerTitle" = "Invite";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "Dx3-QU-3cN"; */
"Dx3-QU-3cN.title" = "Tillbaka";
@ -82,6 +85,12 @@
/* Class = "UILabel"; text = "Chat with"; ObjectID = "Qr0-8H-IJq"; */
"Qr0-8H-IJq.text" = "Chat with";
/* Class = "UITextField"; placeholder = "Enter contact name"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.placeholder" = "Enter contact name";
/* Class = "UITextField"; text = "Send Invitation Link"; ObjectID = "Rg7-YE-y8H"; */
"Rg7-YE-y8H.text" = "Send Invitation Link";
/* Class = "UINavigationItem"; title = "Contacts"; ObjectID = "SEz-IM-IWL"; */
"SEz-IM-IWL.title" = "Contacts";

View file

@ -13,6 +13,9 @@
/* Class = "UILabel"; text = "About"; ObjectID = "3vM-ad-4ap"; */
"3vM-ad-4ap.text" = "Om";
/* Class = "UITableViewController"; title = "Notification settings"; ObjectID = "4VG-XN-BdZ"; */
"4VG-XN-BdZ.title" = "Notification settings";
/* Class = "UILabel"; text = "Account name"; ObjectID = "7ho-Mu-thd"; */
"7ho-Mu-thd.text" = "Namn på kontot";
@ -109,6 +112,9 @@
/* Class = "UILabel"; text = "Blocked contacts"; ObjectID = "MJ0-kw-1Kl"; */
"MJ0-kw-1Kl.text" = "Blockerade kontakter";
/* Class = "UILabel"; text = "Add to system call history"; ObjectID = "Ngk-vc-zET"; */
"Ngk-vc-zET.text" = "Add to system call history";
/* Class = "UILabel"; text = "\"Hidden\" group"; ObjectID = "P82-B8-768"; */
"P82-B8-768.text" = "\"Dold\" grupp";
@ -130,6 +136,12 @@
/* Class = "UILabel"; text = "20 MB"; ObjectID = "UuL-li-3gA"; */
"UuL-li-3gA.text" = "20 MB";
/* Class = "UITableViewSection"; headerTitle = "TELEPHONY"; ObjectID = "v8T-iN-1IT"; */
"v8T-iN-1IT.headerTitle" = "TELEPHONY";
/* Class = "UILabel"; text = "Calls"; ObjectID = "wfP-Tn-CDA"; */
"wfP-Tn-CDA.text" = "Calls";
/* Class = "UITableViewController"; title = "Contacts settings"; ObjectID = "xRS-v5-T5C"; */
"xRS-v5-T5C.title" = "Inställningar för kontakter";

View file

@ -193,22 +193,7 @@ open class AccountManager {
AccountManager.save(account: self, withPassword: newValue);
}
}
open var nickname: String? {
get {
guard let nick = data["nickname"] as? String, !nick.isEmpty else {
return name.localPart;
}
return nick;
}
set {
if newValue == nil {
data.removeValue(forKey: "nickname");
} else {
data["nickname"] = newValue;
}
}
}
open var server:String? {
get {

View file

@ -50,6 +50,7 @@ public enum Settings: String {
case EnableMarkdownFormatting = "markdown"
case ShowEmoticons
case messageStyling
case addCallsToSystem
@available(iOS 13.0, *)
case linkPreviews
@ -454,7 +455,7 @@ public enum AccountSettings {
accounts.forEach { account in
if AccountSettings.displayName(account).getString() == nil, let currentAccount = AccountManager.getAccount(for: account) {
AccountSettings.displayName(account).set(string: currentAccount.nickname ?? currentAccount.name.stringValue)
AccountSettings.displayName(account).set(string: currentAccount.name.stringValue)
}
}

View file

@ -30,7 +30,6 @@ class DisplayNameViewController: UIViewController {
if let account = account, let displayName = AccountSettings.displayName(account).getString() {
textView.text = displayName
textView.textColor = .black
} else {
textView.text = NSLocalizedString("Name", comment: "")
textView.textColor = .lightGray

View file

@ -54,7 +54,7 @@ class CallManager: NSObject, CXProviderDelegate {
private let pushRegistry: PKPushRegistry;
private let provider: CXProvider;
public var provider: CXProvider;
private let callController: CXCallController;
private(set) var currentCall: Call?;
@ -92,11 +92,11 @@ class CallManager: NSObject, CXProviderDelegate {
config.iconTemplateImageData = image.pngData();
}
}
config.includesCallsInRecents = false;
config.includesCallsInRecents = Settings.addCallsToSystem.getBool()
config.supportsVideo = true;
config.maximumCallsPerCallGroup = 1;
config.maximumCallGroups = 1;
config.supportedHandleTypes = [.generic];
config.supportedHandleTypes = [.generic, .phoneNumber];
provider = CXProvider(configuration: config);
callController = CXCallController();
@ -125,7 +125,11 @@ class CallManager: NSObject, CXProviderDelegate {
update.supportsHolding = false
provider.configuration.supportsVideo = call.media.contains(.video)
update.hasVideo = AVCaptureDevice.authorizationStatus(for: .video) == .authorized && call.media.contains(.video)
update.remoteHandle = call.media.contains(.video) ? CXHandle(type: .generic, value: call.jid.stringValue) : nil
let telephonyProvider = AccountSettings.telephonyProvider(call.account).getString() ?? ""
let handle = telephonyProvider == call.jid.domain ? CXHandle(type: .phoneNumber, value: (call.jid.localPart ?? "Unkown")) : CXHandle(type: .generic, value: call.jid.stringValue)
update.remoteHandle = handle
configureAudioSession()
provider.reportNewIncomingCall(with: call.uuid, update: update, completion: { err in
guard let error = err else {
@ -168,7 +172,10 @@ class CallManager: NSObject, CXProviderDelegate {
let rosterModule: RosterModule? = XmppService.instance.getClient(for: call.account)?.modulesManager.getModule(RosterModule.ID);
let name = rosterModule?.rosterStore.get(for: JID(call.jid))?.name ?? call.jid.stringValue;
let startCallAction = CXStartCallAction(call: call.uuid, handle: CXHandle(type: .generic, value: call.jid.stringValue));
let telephonyProvider = AccountSettings.telephonyProvider(call.account).getString() ?? ""
let handle = telephonyProvider == call.jid.domain ? CXHandle(type: .phoneNumber, value: (call.jid.localPart ?? "Unkown")) : CXHandle(type: .generic, value: call.jid.stringValue)
let startCallAction = CXStartCallAction(call: call.uuid, handle: handle)
startCallAction.isVideo = call.media.contains(.video);
startCallAction.contactIdentifier = name;
let transaction = CXTransaction(action: startCallAction);
@ -556,7 +563,7 @@ class CallManager: NSObject, CXProviderDelegate {
let controller = UIStoryboard(name: "VoIP", bundle: nil).instantiateViewController(withIdentifier: "VideoCallController") as! VideoCallController;
self.delegate = controller;
topController?.show(controller, sender: self);
topController?.present(controller, animated: true, completion: nil)
}
func switchCameraDevice() {

View file

@ -0,0 +1,41 @@
//
// CallsAccountSelectionController.swift
// Snikket
//
// Created by Muhammad Khalid on 02/11/2021.
// Copyright © 2021 Snikket. All rights reserved.
//
import UIKit
import TigaseSwift
class CallsAccountSelectionController: UITableViewController {
var didSelectAccount: ((BareJID) -> Void)!
var accounts = [BareJID]()
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int { 1 }
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { accounts.count }
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: .default, reuseIdentifier: nil)
cell.textLabel?.text = self.accounts[indexPath.row].stringValue
cell.textLabel?.textAlignment = .center
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
self.dismiss(animated: true, completion: {
self.didSelectAccount(self.accounts[indexPath.row])
})
}
}