Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Update Matched V 0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
RooyeKhat committed May 10, 2017
1 parent 5b10374 commit a9c2d24
Show file tree
Hide file tree
Showing 56 changed files with 2,089 additions and 229 deletions.
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ github "krzyzanowskim/CryptoSwift"

github "RooyeKhat-Media/Gifu" "v2.0.0-b"
github "RooyeKhat-Media/ALCameraViewController" "1.2.7"
github "RooyeKhat-Media/IGProtoBuffLibrary" "build47-5"
github "RooyeKhat-Media/INSPhotoGallery" "1.1.0-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "build54"
github "RooyeKhat-Media/INSPhotoGallery" "1.1.0-d"
github "RooyeKhat-Media/Starscream" "2.0.4-a"
github "RooyeKhat-Media/DBAttachmentPickerController" "1.1.4-a"

Expand Down
10 changes: 5 additions & 5 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
github "RooyeKhat-Media/IGProtoBuffLibrary" "build47-5"
github "KennethTsang/GrowingTextView" "0.2.4"
github "MortimerGoro/MGSwipeTableCell" "1.5.6"
github "ReactiveX/RxSwift" "3.4.0"
github "ReactiveX/RxSwift" "3.4.1"
github "RooyeKhat-Media/ALCameraViewController" "1.2.7"
github "RooyeKhat-Media/DBAttachmentPickerController" "1.1.4-a"
github "RooyeKhat-Media/Gifu" "v2.0.0-b"
github "RooyeKhat-Media/INSPhotoGallery" "1.1.0-a"
github "RooyeKhat-Media/IGProtoBuffLibrary" "build54"
github "RooyeKhat-Media/INSPhotoGallery" "1.1.0-d"
github "RooyeKhat-Media/Protobuf-Swift" "3.0.13-d"
github "RooyeKhat-Media/Starscream" "2.0.4-a"
github "RxSwiftCommunity/RxRealm" "0.6.0"
Expand All @@ -15,5 +15,5 @@ github "artemkrachulov/AKMaskField" "v2.0.3"
github "ashleymills/Reachability.swift" "v3"
github "facebook/pop" "1.0.9"
github "jdg/MBProgressHUD" "1.0.0"
github "krzyzanowskim/CryptoSwift" "0.6.8"
github "realm/realm-cocoa" "v2.5.1"
github "krzyzanowskim/CryptoSwift" "0.6.9"
github "realm/realm-cocoa" "v2.7.0"
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ iGap API manuals: https://github.com/RooyeKhat-Media/iGap-API
Protocol buffers files : https://github.com/RooyeKhat-Media/iGap-API/tree/master/app/assets/proto


## Charge
Using the iGap infrastructure and utilizing it in personal and/or organizational projects are thoroughly free of charge.
## Charge
Using the iGap infrastructure and utilizing it in personal and/or organizational projects are thoroughly free of charge.

## Supports

Expand All @@ -30,7 +30,7 @@ Using the iGap infrastructure and utilizing it in personal and/or organizational
Issues: https://github.com/RooyeKhat-Media/iGap-iOS/issues

## Partner
**[RooyeKhat Media](https://rooyekhat.co/en)** was founded in 2015 aiming to create communicative and informative platforms supported by Internet and network on the basis of modern technology. We focus on the fields of designing, programming, supporting communicative and media software on mobile phones and tablets.
**[RooyeKhat Media](https://rooyekhat.co/en)** was founded in 2015 aiming to create communicative and informative platforms supported by Internet and network on the basis of modern technology. We focus on the fields of designing, programming, supporting communicative and media software on mobile phones and tablets.

## Licence
iGap is released under the [GNU Affero General Public License](LICENSE) . This Free Software Foundation license is fairly new, and thus we wanted to talk about how this license differs from GPL.
Expand Down
7 changes: 7 additions & 0 deletions iGap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
4F9386F81EAE335200397C3B /* IGChannelAndGroupSharedMediaImagesAndVideosCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9386F71EAE335200397C3B /* IGChannelAndGroupSharedMediaImagesAndVideosCollectionViewController.swift */; };
4F9F3E6A1EBA0D91008E05C1 /* IGPushResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9F3E691EBA0D91008E05C1 /* IGPushResponse.swift */; };
931585151E6D567000F4C04B /* IGUserPrivacy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 931585141E6D567000F4C04B /* IGUserPrivacy.swift */; };
93193F281E5811BA0039AC0C /* IGGroupInfoTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93193F271E5811BA0039AC0C /* IGGroupInfoTableViewController.swift */; };
93193F2A1E5811FF0039AC0C /* IGGroupInfoEditNameTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93193F291E5811FF0039AC0C /* IGGroupInfoEditNameTableViewController.swift */; };
Expand Down Expand Up @@ -247,6 +248,7 @@

/* Begin PBXFileReference section */
4F9386F71EAE335200397C3B /* IGChannelAndGroupSharedMediaImagesAndVideosCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGChannelAndGroupSharedMediaImagesAndVideosCollectionViewController.swift; sourceTree = "<group>"; };
4F9F3E691EBA0D91008E05C1 /* IGPushResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGPushResponse.swift; sourceTree = "<group>"; };
931585141E6D567000F4C04B /* IGUserPrivacy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGUserPrivacy.swift; sourceTree = "<group>"; };
93193F271E5811BA0039AC0C /* IGGroupInfoTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGGroupInfoTableViewController.swift; sourceTree = "<group>"; };
93193F291E5811FF0039AC0C /* IGGroupInfoEditNameTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IGGroupInfoEditNameTableViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -848,6 +850,7 @@
FA63BAA81DD70E77000B60AD /* IGRequestInfo.swift */,
FA63BAA21DD70D94000B60AD /* IGRequestSystem.swift */,
FA63BAA61DD70E1A000B60AD /* IGRequestUser.swift */,
4F9F3E691EBA0D91008E05C1 /* IGPushResponse.swift */,
);
path = Requests;
sourceTree = "<group>";
Expand Down Expand Up @@ -1192,6 +1195,9 @@
DevelopmentTeam = MZ7XTDD264;
ProvisioningStyle = Manual;
SystemCapabilities = {
com.apple.Push = {
enabled = 0;
};
com.apple.iCloud = {
enabled = 1;
};
Expand Down Expand Up @@ -1424,6 +1430,7 @@
93A3D3CA1E407E5200D2686F /* IGChooseMemberFromContactToCreateChannelViewController.swift in Sources */,
FA63BAAF1DD70F21000B60AD /* IGRequestChannel.swift in Sources */,
93AA67BC1E4F35580053380C /* IGChannelInfoEditNameTableViewController.swift in Sources */,
4F9F3E6A1EBA0D91008E05C1 /* IGPushResponse.swift in Sources */,
FADE97B31DF2DBF100FF714A /* IGMusicPlayer.swift in Sources */,
FA09536B1E1B97700043ED3F /* IGSettingPrivacyAndSecurityActiveSessionMoreDetailsTableViewController.swift in Sources */,
93193F281E5811BA0039AC0C /* IGGroupInfoTableViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class IGNavigationController: UINavigationController ,UINavigationBarDelegate {
return super.popToRootViewController(animated: animated)
}



func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
Expand Down Expand Up @@ -83,7 +85,8 @@ class IGNavigationController: UINavigationController ,UINavigationBarDelegate {

}

func setCenterView(){

func setCenterView() {
let titleView = UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 45))
let nameLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 150, height: 21))
nameLabel.text = "John Smith"
Expand All @@ -99,11 +102,12 @@ class IGNavigationController: UINavigationController ,UINavigationBarDelegate {
self.navigationBar.topItem?.titleView = titleView
}

func getHightOfNavigationBar()->(CGFloat){
func getHightOfNavigationBar()->(CGFloat) {
let navBarHeight = self.navigationBar.frame.size.height
return navBarHeight
}
func connectingTitleView(){

func connectingTitleView() {
let connectingTitleView = UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 30))
let activityIndicator: UIActivityIndicatorView = UIActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: 30, height: 30))
connectingTitleView.addSubview(activityIndicator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import UIKit
import SnapKit
import MBProgressHUD


class IGNavigationItem: UINavigationItem {

Expand All @@ -22,6 +24,8 @@ class IGNavigationItem: UINavigationItem {
private var centerViewSubLabel: UILabel?
private var typingIndicatorView: IGDotActivityIndicator?
var isUpdatingUserStatusForAction : Bool = false
var isProccesing: Bool = true
var hud = MBProgressHUD()
// var centerViewSubText: UITextField?

private var tapOnRightView: (()->())?
Expand Down Expand Up @@ -111,7 +115,12 @@ class IGNavigationItem: UINavigationItem {
self.leftBarButtonItem = backBarButton
self.title = ""
backViewContainer?.addAction {
self.backViewContainer?.isUserInteractionEnabled = false
//self.hud = MBProgressHUD.showAdded(to: self.backViewContainer!, animated: true)
// self.hud.mode = .indeterminate
_ = self.navigationController?.popViewController(animated: true)
// self.hud.hide(animated: true)

}

}
Expand Down Expand Up @@ -208,7 +217,6 @@ class IGNavigationItem: UINavigationItem {
self.titleView = titleView
}


//MARK: - Messages View
func setNavigationBarForRoom(_ room: IGRoom) {
setRoomAvatar(room)
Expand Down Expand Up @@ -243,15 +251,19 @@ class IGNavigationItem: UINavigationItem {

self.centerViewSubLabel!.text = room.currentActionString()
} else {

typingIndicatorView?.removeFromSuperview()
typingIndicatorView = nil
self.centerViewSubLabel!.snp.makeConstraints { (make) in
make.top.equalTo(self.centerViewMainLabel!.snp.bottom).offset(3)
make.centerX.equalTo(self.centerViewContainer!.snp.centerX)
}
if let peer = room.chatRoom?.peer {
if room.currenctActionsByUsers.first?.value.1 != .typing {
setLastSeenLabelForUser(peer, room: room)
}
} else if let groupRoom = room.groupRoom {

self.centerViewSubLabel!.text = "\(groupRoom.participantCount) member\(groupRoom.participantCount>1 ? "s" : "")"
} else if let channelRoom = room.channelRoom {
self.centerViewSubLabel!.text = "\(channelRoom.participantCount) member\(channelRoom.participantCount>1 ? "s" : "")"
Expand All @@ -271,6 +283,11 @@ class IGNavigationItem: UINavigationItem {
let avatarView = IGAvatarView(frame: avatarViewFrame)
avatarView.setRoom(room)
rightViewContainer!.addSubview(avatarView)

DispatchQueue.main.asyncAfter(deadline: .now() + 10.0) {
self.setRoomAvatar(room)
}

}

private func setRoomInfo(_ room: IGRoom) {
Expand Down Expand Up @@ -300,7 +317,9 @@ class IGNavigationItem: UINavigationItem {
}

if let peer = room.chatRoom?.peer {
setLastSeenLabelForUser(peer , room: room)
if room.currenctActionsByUsers.first?.value.1 != .typing {
setLastSeenLabelForUser(peer , room: room)
}
} else if let groupRoom = room.groupRoom {
self.centerViewSubLabel!.text = "\(groupRoom.participantCount) member\(groupRoom.participantCount>1 ? "s" : "")"
} else if let channelRoom = room.channelRoom {
Expand All @@ -310,6 +329,7 @@ class IGNavigationItem: UINavigationItem {
}

private func setLastSeenLabelForUser(_ user: IGRegisteredUser , room : IGRoom) {
if room.currenctActionsByUsers.first?.value.1 != .typing && typingIndicatorView == nil {
switch user.lastSeenStatus {
case .longTimeAgo:
self.centerViewSubLabel!.text = "A long time ago"
Expand All @@ -321,7 +341,9 @@ class IGNavigationItem: UINavigationItem {
self.centerViewSubLabel!.text = "Last week"
break
case .online:

self.centerViewSubLabel!.text = "Online"

break
case .exactly:
self.centerViewSubLabel!.text = "\(user.lastSeen!.humanReadableForLastSeen())"
Expand All @@ -336,9 +358,10 @@ class IGNavigationItem: UINavigationItem {
self.centerViewSubLabel!.text = "Service Notification"
break
}
print(room.currentActionString())
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.setLastSeenLabelForUser(user , room: room)

DispatchQueue.main.asyncAfter(deadline: .now() + 10.0) {
self.setLastSeenLabelForUser(user , room: room)
}
}
}

Expand Down
Loading

0 comments on commit a9c2d24

Please sign in to comment.