Commit 1a0488ab authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

UI: change tab bar items

Add icons and badges for tab bar items.

Change-Id: I4a806c9c9968de14ae60d73f50f9da826e553e27
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 7da0db38
......@@ -84,6 +84,9 @@
0E2D5F551F9145F200D574BF /* LinkNewDeviceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0E2D5F541F9145F200D574BF /* LinkNewDeviceCell.xib */; };
0E403F811F7D797300C80BC2 /* MessageCellGenerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E403F801F7D797300C80BC2 /* MessageCellGenerated.swift */; };
0E403F831F7D79B000C80BC2 /* MessageCellGenerated.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0E403F821F7D79B000C80BC2 /* MessageCellGenerated.xib */; };
0E6949791FA7E71C0029B60A /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E6949781FA7E71C0029B60A /* BaseViewController.swift */; };
0E9D84491FA7DA6A00C561EB /* ChatTabBarItemViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E9D84481FA7DA6A00C561EB /* ChatTabBarItemViewModel.swift */; };
0E9D844B1FA7DBAA00C561EB /* ContactRequestTabBarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E9D844A1FA7DBAA00C561EB /* ContactRequestTabBarItem.swift */; };
0EB1A5CF1F8EBE03009923E2 /* DeviceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0EB1A5CE1F8EBE03009923E2 /* DeviceCell.xib */; };
0EB1A5D11F8EBE23009923E2 /* DeviceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB1A5D01F8EBE23009923E2 /* DeviceCell.swift */; };
0EB479951FA28A7300106AFD /* ButtonTransparentBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EB479941FA28A7300106AFD /* ButtonTransparentBackground.swift */; };
......@@ -318,6 +321,9 @@
0E2D5F541F9145F200D574BF /* LinkNewDeviceCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LinkNewDeviceCell.xib; sourceTree = "<group>"; };
0E403F801F7D797300C80BC2 /* MessageCellGenerated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageCellGenerated.swift; sourceTree = "<group>"; };
0E403F821F7D79B000C80BC2 /* MessageCellGenerated.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MessageCellGenerated.xib; sourceTree = "<group>"; };
0E6949781FA7E71C0029B60A /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
0E9D84481FA7DA6A00C561EB /* ChatTabBarItemViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTabBarItemViewModel.swift; sourceTree = "<group>"; };
0E9D844A1FA7DBAA00C561EB /* ContactRequestTabBarItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactRequestTabBarItem.swift; sourceTree = "<group>"; };
0EB1A5CE1F8EBE03009923E2 /* DeviceCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DeviceCell.xib; sourceTree = "<group>"; };
0EB1A5D01F8EBE23009923E2 /* DeviceCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceCell.swift; sourceTree = "<group>"; };
0EB479941FA28A7300106AFD /* ButtonTransparentBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonTransparentBackground.swift; sourceTree = "<group>"; };
......@@ -828,6 +834,16 @@
name = DeviceCell;
sourceTree = "<group>";
};
0E9D84471FA7D9EC00C561EB /* TabBar */ = {
isa = PBXGroup;
children = (
0E9D84481FA7DA6A00C561EB /* ChatTabBarItemViewModel.swift */,
0E9D844A1FA7DBAA00C561EB /* ContactRequestTabBarItem.swift */,
0E6949781FA7E71C0029B60A /* BaseViewController.swift */,
);
path = TabBar;
sourceTree = "<group>";
};
0ED2B6F81F96A048001572F0 /* LinknewDevice */ = {
isa = PBXGroup;
children = (
......@@ -850,6 +866,7 @@
1A0C4EBC1F1D48AA00550433 /* Features */ = {
isa = PBXGroup;
children = (
0E9D84471FA7D9EC00C561EB /* TabBar */,
0EDE34C51F868D2D00FFA15C /* Shared */,
1A0C4EBD1F1D48DD00550433 /* Walkthrough */,
1A2D18A71F290FAA00B2C785 /* Conversations */,
......@@ -1388,6 +1405,7 @@
1A3CA32D1F13DA7200283748 /* Chameleon+Ring.swift in Sources */,
0ED2B6FC1F96A158001572F0 /* LinkNewDeviceViewController.swift in Sources */,
1ABE07E21F0D924700D36361 /* Strings.swift in Sources */,
0E9D84491FA7DA6A00C561EB /* ChatTabBarItemViewModel.swift in Sources */,
621231FB1F8D6FEE009B86F0 /* MessageCell.swift in Sources */,
56AC650E1E85694D00EA1AA9 /* DesignableTextField.swift in Sources */,
1A2D189A1F2642C000B2C785 /* NotificationCenter+Ring.swift in Sources */,
......@@ -1404,6 +1422,7 @@
1A2041861F1EA19600C08435 /* CreateAccountViewController.swift in Sources */,
0EDCC8601F98150500B121D7 /* UIView+Rx.swift in Sources */,
1A2D18C21F29180700B2C785 /* AccountCredentialsModel.swift in Sources */,
0E9D844B1FA7DBAA00C561EB /* ContactRequestTabBarItem.swift in Sources */,
1A2D18FF1F29352D00B2C785 /* MeViewModel.swift in Sources */,
62A88D391F6C323500F8AB18 /* PresenceAdapter.mm in Sources */,
1A2D18B71F29164700B2C785 /* SmartlistViewModel.swift in Sources */,
......@@ -1413,6 +1432,7 @@
564C445B1E8EA44E000F92B1 /* Durations.swift in Sources */,
0EB479951FA28A7300106AFD /* ButtonTransparentBackground.swift in Sources */,
0EB1A5D11F8EBE23009923E2 /* DeviceCell.swift in Sources */,
0E6949791FA7E71C0029B60A /* BaseViewController.swift in Sources */,
56C715FF1F0D36C600770048 /* ContactsAdapter.mm in Sources */,
1A5DC0281F3564AA0075E8EF /* MessageModel.swift in Sources */,
56BBC9DF1EDDC9D300CDAF8B /* LookupNameResponse.m in Sources */,
......
......@@ -46,8 +46,11 @@ struct ColorAsset {
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
enum Asset {
static let accountIcon = ImageAsset(name: "account_icon")
static let addPerson = ImageAsset(name: "add_person")
static let backgroundRing = ImageAsset(name: "background_ring")
static let contactRequestIcon = ImageAsset(name: "contact_request_icon")
static let conversationIcon = ImageAsset(name: "conversation_icon")
static let device = ImageAsset(name: "device")
static let icContactPicture = ImageAsset(name: "ic_contact_picture")
static let logoRingBeta2Blanc = ImageAsset(name: "logo-ring-beta2-blanc")
......@@ -57,8 +60,11 @@ enum Asset {
static let allColors: [ColorAsset] = [
]
static let allImages: [ImageAsset] = [
accountIcon,
addPerson,
backgroundRing,
contactRequestIcon,
conversationIcon,
device,
icContactPicture,
logoRingBeta2Blanc,
......
......@@ -79,7 +79,7 @@ enum L10n {
static let contactRequestsTabBarTitle = L10n.tr("Localizable", "global.contactRequestsTabBarTitle")
/// Home
static let homeTabBarTitle = L10n.tr("Localizable", "global.homeTabBarTitle")
/// Me
/// Account
static let meTabBarTitle = L10n.tr("Localizable", "global.meTabBarTitle")
/// Ok
static let ok = L10n.tr("Localizable", "global.ok")
......
......@@ -30,14 +30,17 @@ class ContactRequestsCoordinator: Coordinator, StateableResponsive {
var childCoordinators = [Coordinator]()
private let navigationViewController = UINavigationController()
private let navigationViewController = BaseViewController(with: TabBarItemType.contactRequest)
private let injectionBag: InjectionBag
let disposeBag = DisposeBag()
let stateSubject = PublishSubject<State>()
let contactService: ContactsService
required init (with injectionBag: InjectionBag) {
self.injectionBag = injectionBag
self.contactService = injectionBag.contactsService
self.navigationViewController.viewModel = ContactRequestTabBarItem(with: self.injectionBag)
}
func start () {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gUS-mM-rdY">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gUS-mM-rdY">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Invitations-->
<!--Contact Requests View Controller-->
<scene sceneID="wW4-22-iqo">
<objects>
<viewController title="Invitations" id="gUS-mM-rdY" customClass="ContactRequestsViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="gUS-mM-rdY" customClass="ContactRequestsViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="DDk-7J-YQx"/>
<viewControllerLayoutGuide type="bottom" id="Y4B-Y3-6GH"/>
......
......@@ -40,7 +40,6 @@ class ContactRequestsViewController: UIViewController, StoryboardBased, ViewMode
override func viewDidLoad() {
super.viewDidLoad()
self.title = L10n.Global.contactRequestsTabBarTitle
self.navigationItem.title = L10n.Global.contactRequestsTabBarTitle
}
......
......@@ -37,23 +37,27 @@ class ConversationsCoordinator: Coordinator, StateableResponsive {
var childCoordinators = [Coordinator]()
private let navigationViewController = UINavigationController()
private let navigationViewController = BaseViewController(with: TabBarItemType.chat)
private let injectionBag: InjectionBag
let disposeBag = DisposeBag()
let stateSubject = PublishSubject<State>()
let conversationsService: ConversationsService
let accountService: AccountsService
required init (with injectionBag: InjectionBag) {
self.injectionBag = injectionBag
self.conversationsService = injectionBag.conversationsService
self.accountService = injectionBag.accountService
self.stateSubject.subscribe(onNext: { [unowned self] (state) in
guard let state = state as? ConversationsState else { return }
switch state {
case .conversationDetail (let conversationViewModel):
self.showConversation(withConversationViewModel: conversationViewModel)
break
}
}).disposed(by: self.disposeBag)
self.navigationViewController.viewModel = ChatTabBarItemViewModel(with: self.injectionBag)
}
......
......@@ -9,10 +9,10 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Home-->
<!--Smartlist View Controller-->
<scene sceneID="oD9-xn-mt7">
<objects>
<viewController title="Home" id="Raw-Ee-7sK" customClass="SmartlistViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="Raw-Ee-7sK" customClass="SmartlistViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="sbJ-yn-t3e"/>
<viewControllerLayoutGuide type="bottom" id="cfq-zl-uux"/>
......@@ -138,7 +138,6 @@
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<tabBarItem key="tabBarItem" title="Home" id="o5c-No-Dpq"/>
<navigationItem key="navigationItem" id="zLl-0A-Dht"/>
<connections>
<outlet property="cellularAlertLabel" destination="dHy-gp-i6K" id="W9w-Mi-GTY"/>
......
......@@ -74,7 +74,6 @@ class SmartlistViewController: UIViewController, StoryboardBased, ViewModelBased
func setupUI() {
self.title = L10n.Global.homeTabBarTitle
self.navigationItem.title = L10n.Global.homeTabBarTitle
self.viewModel.hideNoConversationsMessage
......
......@@ -15,10 +15,10 @@
</array>
</customFonts>
<scenes>
<!--Me-->
<!--Me View Controller-->
<scene sceneID="JC9-vU-UJ4">
<objects>
<viewController title="Me" id="RuW-kz-iBP" customClass="MeViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="RuW-kz-iBP" customClass="MeViewController" customModule="Ring" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="SYf-gf-IKh"/>
<viewControllerLayoutGuide type="bottom" id="tam-QD-Xpf"/>
......@@ -28,7 +28,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ring id" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="11" translatesAutoresizingMaskIntoConstraints="NO" id="rC6-Ga-QjY" userLabel="RingId Label">
<rect key="frame" x="21" y="209" width="333" height="18"/>
<rect key="frame" x="21" y="249" width="333" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="UsR-G7-bkE"/>
</constraints>
......@@ -75,14 +75,13 @@
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_contact_picture" translatesAutoresizingMaskIntoConstraints="NO" id="8HY-Zl-94u">
<rect key="frame" x="137" y="70" width="100" height="100"/>
<rect key="frame" x="137" y="30" width="100" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="3Ik-A7-Cyx"/>
<constraint firstAttribute="width" constant="100" id="xE6-h0-miE"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Username is not registered" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w8x-Sv-T50">
<rect key="frame" x="21" y="232" width="333" height="23"/>
<rect key="frame" x="21" y="272" width="333" height="23"/>
<fontDescription key="fontDescription" type="system" pointSize="19"/>
<color key="textColor" red="0.20000000300000001" green="0.20000000300000001" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -117,7 +116,6 @@
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
<tabBarItem key="tabBarItem" title="Me" id="AKc-Hb-EHr"/>
<navigationItem key="navigationItem" id="vC8-Ti-TTd"/>
<connections>
<outlet property="nameLabel" destination="w8x-Sv-T50" id="IgU-9F-Fkh"/>
......
......@@ -39,7 +39,6 @@ class MeViewController: EditProfileViewController, StoryboardBased, ViewModelBas
// MARK: - functions
override func viewDidLoad() {
super.viewDidLoad()
self.title = L10n.Global.meTabBarTitle
self.navigationItem.title = L10n.Global.meTabBarTitle
self.setupUI()
}
......
......@@ -39,7 +39,7 @@ class MeCoordinator: Coordinator, StateableResponsive {
var childCoordinators = [Coordinator]()
private let navigationViewController = UINavigationController()
private let navigationViewController = BaseViewController(with: TabBarItemType.account)
private let injectionBag: InjectionBag
let disposeBag = DisposeBag()
......@@ -58,7 +58,6 @@ class MeCoordinator: Coordinator, StateableResponsive {
self.showLinkDeviceWindow()
}
}).disposed(by: self.disposeBag)
}
func start () {
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_perm_identity.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_perm_identity_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_perm_identity_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_mail_outline.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_mail_outline_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_mail_outline_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_chat.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_chat_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_chat_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -21,7 +21,7 @@
// Global
"global.homeTabBarTitle" = "Home";
"global.contactRequestsTabBarTitle" = "Invitations";
"global.meTabBarTitle" = "Me";
"global.meTabBarTitle" = "Account";
"global.ok" = "Ok";
// Smartlist
......
/*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import Foundation
import RxSwift
protocol TabBarItemViewModel {
var itemBadgeValue: Observable<String?> {get set}
}
public enum TabBarItemType {
case chat
case account
case contactRequest
var tabBarItem: UITabBarItem {
switch self {
case .chat:
return UITabBarItem(title: L10n.Global.homeTabBarTitle, image: UIImage(named: "conversation_icon"), selectedImage: UIImage(named: "conversation_icon"))
case .account:
return UITabBarItem(title: L10n.Global.meTabBarTitle, image: UIImage(named: "account_icon"), selectedImage: UIImage(named: "account_icon"))
case .contactRequest:
return UITabBarItem(title: L10n.Global.contactRequestsTabBarTitle, image: UIImage(named: "contact_request_icon"), selectedImage: UIImage(named: "contact_request_icon"))
}
}
}
class BaseViewController: UINavigationController {
let disposeBag = DisposeBag()
var viewModel: TabBarItemViewModel? {
didSet {
self.viewModel?.itemBadgeValue.bind(to: self.tabBarItem.rx.badgeValue)
.disposed(by: self.disposeBag)
}
}
convenience init(with type: TabBarItemType) {
self.init()
self.tabBarItem = type.tabBarItem
}
}
/*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import Foundation
import RxSwift
class ChatTabBarItemViewModel: ViewModel, TabBarItemViewModel {
var itemBadgeValue: Observable<String?>
required init(with injectionBag: InjectionBag) {
let accountService = injectionBag.accountService
let conversationService = injectionBag.conversationsService
let accountHelper = AccountModelHelper(withAccount: accountService.currentAccount!)
self.itemBadgeValue = {
return conversationService.conversations.map({ conversations in
return conversations.map({ conversation in
return conversation.messages.filter({ message in
return message.status != .read && message.author != accountHelper.ringId!
}).count
}).reduce(0, +)
})
}()
.map { number in
if number == 0 {
return nil
}
return "\(number)"
}
}
}
/*
* Copyright (C) 2017 Savoir-faire Linux Inc.
*
* Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import Foundation
import RxSwift
class ContactRequestTabBarItem: ViewModel, TabBarItemViewModel {
var itemBadgeValue: Observable<String?>
required init(with injectionBag: InjectionBag) {
let contactService = injectionBag.contactsService
self.itemBadgeValue = contactService.contactRequests.asObservable().map({items in
if items.isEmpty {
return nil
}
return "\(items.count)"})
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment