Skip to content

Commit

Permalink
Merge pull request #10 from RooyeKhat-Media/master
Browse files Browse the repository at this point in the history
merge Update
  • Loading branch information
RooyeKhat authored May 30, 2018
2 parents 2ff517c + d278b47 commit d6dc976
Show file tree
Hide file tree
Showing 44 changed files with 927 additions and 257 deletions.
3 changes: 1 addition & 2 deletions Cartfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ github "RooyeKhat-Media/ALCameraViewController" "3.0.3"
github "RooyeKhat-Media/INSPhotoGallery" "1.2.5-a"
github "RooyeKhat-Media/Starscream" "3.0.4-a"
github "RooyeKhat-Media/DBAttachmentPickerController" "1.1.4-a"
github "RooyeKhat-Media/swift-protobuf" "1.0.2-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "74-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "Build80"
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ github "ReactiveX/RxSwift" "4.1.2"
github "RooyeKhat-Media/ALCameraViewController" "3.0.3"
github "RooyeKhat-Media/DBAttachmentPickerController" "1.1.4-a"
github "RooyeKhat-Media/Gifu" "v3.0.0-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "74-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "Build80"
github "RooyeKhat-Media/INSPhotoGallery" "1.2.5-a"
github "RooyeKhat-Media/Starscream" "3.0.4-a"
github "RooyeKhat-Media/swift-protobuf" "1.0.2-a"
github "RooyeKhat-Media/swift-protobuf" "1.0.3-iGap"
github "RxSwiftCommunity/RxRealm" "0.7.5"
github "SnapKit/SnapKit" "4.0.0"
github "TakeScoop/SwiftyRSA" "0.5.0"
Expand All @@ -18,5 +18,5 @@ github "evgenyneu/Cosmos" "15.0.0"
github "facebook/pop" "1.0.10"
github "jdg/MBProgressHUD" "1.1.0"
github "krzyzanowskim/CryptoSwift" "0.7.2"
github "ninjaprox/NVActivityIndicatorView" "4.2.0"
github "realm/realm-cocoa" "v3.5.0"
github "ninjaprox/NVActivityIndicatorView" "4.2.1"
github "realm/realm-cocoa" "v3.6.0"
34 changes: 26 additions & 8 deletions iGap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
FA11E28A1DE8A8A900A2F87C /* IGAttachmentManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA11E2891DE8A8A900A2F87C /* IGAttachmentManager.swift */; };
FA11E28D1DE99BF400A2F87C /* IGFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA11E28C1DE99BF400A2F87C /* IGFactory.swift */; };
FA1C449C1DC716A20016C346 /* IGCountry.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1C449B1DC716A20016C346 /* IGCountry.swift */; };
FA27F74020BD77ED00EC6A97 /* api.key in Sources */ = {isa = PBXBuildFile; fileRef = FA27F73F20BD77ED00EC6A97 /* api.key */; };
FA3306361F445A570096031A /* IRANSans.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FA3306351F445A570096031A /* IRANSans.ttf */; };
FA33063B1F445AE80096031A /* IRANSans_Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FA3306371F445AE80096031A /* IRANSans_Bold.ttf */; };
FA33063C1F445AE80096031A /* IRANSans_Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FA3306381F445AE80096031A /* IRANSans_Light.ttf */; };
Expand Down Expand Up @@ -216,6 +217,7 @@
FA8F22581DD89F7C005A90D1 /* IGAvatar.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8F22571DD89F7C005A90D1 /* IGAvatar.swift */; };
FA8F8A682086027100AF03CB /* IGMapNearbyDistanceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8F8A672086027100AF03CB /* IGMapNearbyDistanceCell.swift */; };
FA8F8A69208602AB00AF03CB /* IGMapNearbyDistanceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA8F8A66208600AB00AF03CB /* IGMapNearbyDistanceCell.xib */; };
FA90B72A20B53EBC00043C89 /* MessageReceiveObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA90B72920B53EBC00043C89 /* MessageReceiveObserver.swift */; };
FA927E002028416300DF7145 /* VideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA927DFF2028416300DF7145 /* VideoCell.swift */; };
FA927E02202841C900DF7145 /* VideoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA927E012028418600DF7145 /* VideoCell.xib */; };
FA927E0420284D7800DF7145 /* GifCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA927E0320284D7800DF7145 /* GifCell.swift */; };
Expand Down Expand Up @@ -448,6 +450,8 @@
FA11E2891DE8A8A900A2F87C /* IGAttachmentManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGAttachmentManager.swift; sourceTree = "<group>"; };
FA11E28C1DE99BF400A2F87C /* IGFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGFactory.swift; sourceTree = "<group>"; };
FA1C449B1DC716A20016C346 /* IGCountry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGCountry.swift; sourceTree = "<group>"; };
FA27F73F20BD77ED00EC6A97 /* api.key */ = {isa = PBXFileReference; lastKnownFileType = text; path = api.key; sourceTree = "<group>"; };
FA27F74120BD780300EC6A97 /* secret.key */ = {isa = PBXFileReference; lastKnownFileType = text; path = secret.key; sourceTree = "<group>"; };
FA3306351F445A570096031A /* IRANSans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = IRANSans.ttf; sourceTree = "<group>"; };
FA3306371F445AE80096031A /* IRANSans_Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = IRANSans_Bold.ttf; sourceTree = "<group>"; };
FA3306381F445AE80096031A /* IRANSans_Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = IRANSans_Light.ttf; sourceTree = "<group>"; };
Expand Down Expand Up @@ -537,6 +541,7 @@
FA8F22571DD89F7C005A90D1 /* IGAvatar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGAvatar.swift; sourceTree = "<group>"; };
FA8F8A66208600AB00AF03CB /* IGMapNearbyDistanceCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IGMapNearbyDistanceCell.xib; sourceTree = "<group>"; };
FA8F8A672086027100AF03CB /* IGMapNearbyDistanceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IGMapNearbyDistanceCell.swift; sourceTree = "<group>"; };
FA90B72920B53EBC00043C89 /* MessageReceiveObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageReceiveObserver.swift; sourceTree = "<group>"; };
FA927DFF2028416300DF7145 /* VideoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCell.swift; sourceTree = "<group>"; };
FA927E012028418600DF7145 /* VideoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VideoCell.xib; sourceTree = "<group>"; };
FA927E0320284D7800DF7145 /* GifCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GifCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1124,6 +1129,14 @@
path = Map;
sourceTree = "<group>";
};
FA90B72820B53E5F00043C89 /* Protocols */ = {
isa = PBXGroup;
children = (
FA90B72920B53EBC00043C89 /* MessageReceiveObserver.swift */,
);
path = Protocols;
sourceTree = "<group>";
};
FA930D961E5B178F00069EE1 /* ThirdParty Libraries */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1353,7 +1366,7 @@
FAF7960C1DAA39660030509B /* Model */,
FAF795FF1DAA392F0030509B /* VIew */,
FAF7960B1DAA39660030509B /* Controller */,
FAF796081DAA39460030509B /* Supporting FIles */,
FAF796081DAA39460030509B /* SupportingFiles */,
);
path = iGap;
sourceTree = "<group>";
Expand All @@ -1374,20 +1387,23 @@
path = VIew;
sourceTree = "<group>";
};
FAF796081DAA39460030509B /* Supporting FIles */ = {
FAF796081DAA39460030509B /* SupportingFiles */ = {
isa = PBXGroup;
children = (
FA752C321E1EC571008694C6 /* iGap.entitlements */,
FAF796091DAA39460030509B /* Info.plist */,
FA5097D21DEDA18000A44699 /* iGap-Bridging-Header.h */,
FAF8BFE91E34AF00002AF525 /* GoogleService-Info.plist */,
FA27F74120BD780300EC6A97 /* secret.key */,
FA27F73F20BD77ED00EC6A97 /* api.key */,
);
path = "Supporting FIles";
path = SupportingFiles;
sourceTree = "<group>";
};
FAF7960B1DAA39660030509B /* Controller */ = {
isa = PBXGroup;
children = (
FA90B72820B53E5F00043C89 /* Protocols */,
FAD530561E0BD6C300FE6C54 /* Custom Master Controllers */,
FA087B2C1DC4A27200E139FA /* View Controllers */,
);
Expand Down Expand Up @@ -1578,7 +1594,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "./Fabric.framework/run a8bb9474c4f59357347dbd3fd5707ca541e2a740 73c66be76fb6cd1becc07ca6b9a77d9dd134ff35089fe7aa02dbfa33ad57b654";
shellScript = "apiKey=$(sed -n '1p' < ./iGap/SupportingFiles/api.key)\nsecretKey=$(sed -n '2p' < ./iGap/SupportingFiles/secret.key)\n\n/usr/libexec/PlistBuddy -c \"Set :Fabric:APIKey $apiKey\" ./iGap/SupportingFiles/Info.plist\n\n\"./Fabric.framework/run\" $apiKey $secretKey";
};
FADF684C1DB2607B00DC5038 /* [RS] Set Build Number */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -1799,6 +1815,7 @@
FA8D056D20739C96007861E7 /* IGSettingAddContactViewController.swift in Sources */,
FAD580941DDC5C4E00A242DE /* IGMessageCollectionViewCell.swift in Sources */,
FA8204382025C97300A795D5 /* ImageCell.swift in Sources */,
FA27F74020BD77ED00EC6A97 /* api.key in Sources */,
FA927E002028416300DF7145 /* VideoCell.swift in Sources */,
FA0953561E1B97700043ED3F /* IGSettingChatTableViewController.swift in Sources */,
FAD5808F1DDC5C1900A242DE /* IGMessageGeneralCollectionViewCell.swift in Sources */,
Expand All @@ -1820,6 +1837,7 @@
FA03C1A020429D46008812E3 /* RTCClient.swift in Sources */,
FA0CC80B1E5D7D4400556283 /* RegexParser.swift in Sources */,
FA09538F1E1B97E20043ED3F /* SSRadioButtonController.swift in Sources */,
FA90B72A20B53EBC00043C89 /* MessageReceiveObserver.swift in Sources */,
9366D98C1E363C2500998BA3 /* IGSettingAboutWebViewViewController.swift in Sources */,
FA0CC8071E5D7D4400556283 /* ActiveBuilder.swift in Sources */,
FA42EF0E1E5C224F00CF8A32 /* CGSize.swift in Sources */,
Expand Down Expand Up @@ -2025,15 +2043,15 @@
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "iGap/Supporting FIles/Info.plist";
INFOPLIST_FILE = iGap/SupportingFiles/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = net.iGap;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "iGap/Supporting FIles/iGap-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "iGap/SupportingFiles/iGap-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Debug;
Expand All @@ -2053,15 +2071,15 @@
"$(PROJECT_DIR)/Carthage/Build/iOS",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "iGap/Supporting FIles/Info.plist";
INFOPLIST_FILE = iGap/SupportingFiles/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = net.iGap;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "iGap/Supporting FIles/iGap-Bridging-Header.h";
SWIFT_OBJC_BRIDGING_HEADER = "iGap/SupportingFiles/iGap-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class IGNavigationItem: UINavigationItem {
self.centerViewMainLabel!.font = UIFont.igFont(ofSize: 16.0, weight: .bold)//boldSystemFont(ofSize: 16)
self.centerViewContainer!.addSubview(self.centerViewMainLabel!)
self.centerViewMainLabel!.snp.makeConstraints { (make) in
make.top.equalTo(self.centerViewContainer!.snp.top).offset(0)
make.top.equalTo(self.centerViewContainer!.snp.top)
make.leading.equalTo(self.centerViewContainer!.snp.leading).offset(5).priority(.required)
make.width.lessThanOrEqualToSuperview().offset(-25)
}
Expand All @@ -432,10 +432,14 @@ class IGNavigationItem: UINavigationItem {
self.centerViewSubLabel!.font = UIFont.igFont(ofSize: 12.0, weight: .regular)//boldSystemFont(ofSize: 12)
self.centerViewContainer!.addSubview(self.centerViewSubLabel!)
self.centerViewSubLabel!.snp.makeConstraints { (make) in
make.top.equalTo(self.centerViewMainLabel!.snp.bottom).offset(3)
make.top.equalTo(self.centerViewMainLabel!.snp.bottom).offset(-3)
make.leading.equalTo(self.centerViewContainer!.snp.leading).offset(5)
}

let verifiedFrame = CGRect(x: 20, y: 5, width: 25, height: 25)
let imgVerified = UIImageView(frame: verifiedFrame)
imgVerified.image = UIImage(named:"IG_Verify")

if room.mute == .mute {
let muteFrame = CGRect(x: 20, y: 5, width: 25, height: 25)
let imgMute = UIImageView(frame: muteFrame)
Expand All @@ -449,6 +453,26 @@ class IGNavigationItem: UINavigationItem {
make.top.equalTo(self.centerViewMainLabel!.snp.top).offset(3)
make.right.equalTo(self.centerViewMainLabel!.snp.right).offset(20)
}

if isVerified(room: room) {
self.centerViewContainer!.addSubview(imgVerified)
imgVerified.snp.makeConstraints { (make) in
make.width.equalTo(20)
make.height.equalTo(20)
make.top.equalTo(self.centerViewMainLabel!.snp.top).offset(3)
make.right.equalTo(imgMute.snp.right).offset(25)
}
}
} else {
if isVerified(room: room) {
self.centerViewContainer!.addSubview(imgVerified)
imgVerified.snp.makeConstraints { (make) in
make.width.equalTo(20)
make.height.equalTo(20)
make.top.equalTo(self.centerViewMainLabel!.snp.top).offset(3)
make.right.equalTo(self.centerViewMainLabel!.snp.right).offset(25)
}
}
}

if let peer = room.chatRoom?.peer {
Expand All @@ -462,6 +486,22 @@ class IGNavigationItem: UINavigationItem {
}
}

private func isVerified(room: IGRoom) -> Bool {
var verified = false
if room.type == .chat {
if let user = room.chatRoom?.peer {
if user.isVerified {
verified = true
}
}
} else if room.type == .channel {
if (room.channelRoom?.isVerified)! {
verified = true
}
}
return verified
}

private func setLastSeenLabelForUser(_ user: IGRegisteredUser , room : IGRoom) {

if isCloud(room: room){
Expand Down
15 changes: 15 additions & 0 deletions iGap/Controller/Protocols/MessageReceiveObserver.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* This is the source code of iGap for iOS
* It is licensed under GNU AGPL v3.0
* You should have received a copy of the license in this archive (see LICENSE).
* Copyright © 2017 , iGap - www.iGap.net
* iGap Messenger | Free, Fast and Secure instant messaging application
* The idea of the RooyeKhat Media Company - www.RooyeKhat.co
* All rights reserved.
*/

import IGProtoBuff

protocol MessageReceiveObserver {
func onMessageRecieve(messages: [IGPRoomMessage])
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class IGChannelInfoTableViewController: UITableViewController , UIGestureRecogni
@IBOutlet weak var allMemberCell: UITableViewCell!
@IBOutlet weak var channelLinkCell: UITableViewCell!
@IBOutlet weak var adminAndModeratorCell: UITableViewCell!

@IBOutlet weak var imgVerified: UIImageView!

var selectedChannel : IGChannelRoom?
private let disposeBag = DisposeBag()
var room : IGRoom?
Expand Down Expand Up @@ -696,6 +697,17 @@ class IGChannelInfoTableViewController: UITableViewController , UIGestureRecogni
}

func showChannelInfo(){

if (room?.isInvalidated)! {
return
}

if (room?.channelRoom?.isVerified)! {
imgVerified.isHidden = false
} else {
imgVerified.isHidden = true
}

channelNameLabelTitle.text = room?.title
channelNameLabel.text = room?.title
ChannelDescriptionLabel.text = room?.channelRoom?.roomDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class IGLookAndFind: UIViewController, UITableViewDataSource, UITableViewDelegat
private func openUserProfile(searchResult: IGRealmClientSearchUsername){
let user = searchResult.user
let room = searchResult.room
let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let storyboard : UIStoryboard = UIStoryboard(name: "profile", bundle: nil)
let destinationVC = storyboard.instantiateViewController(withIdentifier: "IGRegistredUserInfoTableViewController") as! IGRegistredUserInfoTableViewController
destinationVC.user = user
destinationVC.previousRoomId = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ class IGSettingPrivacy_SecurityTableViewController: UITableViewController, UIGes
}

func showPrivacyInfo(){

if (userPrivacy?.isInvalidated)! {
return
}

if let avatarPrivacy = userPrivacy?.avatar {
avatarUserPrivacy = avatarPrivacy
switch avatarPrivacy{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,8 @@ class IGSettingTableViewController: UITableViewController , NVActivityIndicatorV
}

}

self.scheduledTimerWithTimeInterval()
}
scheduledTimerWithTimeInterval()
}
func scheduledTimerWithTimeInterval(){
// Scheduling timer to Call the function **Countdown** with the interval of 1 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,22 @@ class IGAccountTableViewController: UITableViewController , UINavigationControll
}

func updateUI() {
nicknameEntryLabel.text = currentUser.displayName
usernameEntryLabel.text = currentUser.username
emailEntryLabel.text = currentUser.email
phoneNumberEntryLabel.text = "\(currentUser.phone)"
bioEntryLabel.text = currentUser.bio

if currentUser.selfRemove == -1 {
selfDestructionLabel.text = ""
} else if currentUser.selfRemove == 12 {
selfDestructionLabel.text = "1 year"
} else if currentUser.selfRemove == 1 {
selfDestructionLabel.text = "\(currentUser.selfRemove)" + " month"
} else {
selfDestructionLabel.text = "\(currentUser.selfRemove)" + " months"
DispatchQueue.main.async {
self.nicknameEntryLabel.text = self.currentUser.displayName
self.usernameEntryLabel.text = self.currentUser.username
self.emailEntryLabel.text = self.currentUser.email
self.phoneNumberEntryLabel.text = "\(self.currentUser.phone)"
self.bioEntryLabel.text = self.currentUser.bio

if self.currentUser.selfRemove == -1 {
self.selfDestructionLabel.text = ""
} else if self.currentUser.selfRemove == 12 {
self.selfDestructionLabel.text = "1 year"
} else if self.currentUser.selfRemove == 1 {
self.selfDestructionLabel.text = "\(self.currentUser.selfRemove)" + " month"
} else {
self.selfDestructionLabel.text = "\(self.currentUser.selfRemove)" + " months"
}
}
}

Expand Down
Loading

0 comments on commit d6dc976

Please sign in to comment.