Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement call list #5357

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Config/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ final class BuildSettings: NSObject {
static let homeScreenShowFavouritesTab: Bool = true
static let homeScreenShowPeopleTab: Bool = true
static let homeScreenShowRoomsTab: Bool = true
static let homeScreenShowCallsTab: Bool = true
static let homeScreenShowCommunitiesTab: Bool = true

// MARK: - General Settings Screen
Expand Down
31 changes: 28 additions & 3 deletions Riot/Assets/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="TFZ-TK-2WH" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1929" y="-2817"/>
<point key="canvasLocation" x="1929" y="-2819"/>
</scene>
<!--Favourites View Controller-->
<scene sceneID="z6B-k5-ano">
Expand All @@ -147,6 +147,25 @@
</objects>
<point key="canvasLocation" x="942" y="-2049"/>
</scene>
<!--Calls View Controller-->
<scene sceneID="OGR-iF-y7H">
<objects>
<viewController storyboardIdentifier="CallsViewController" title="Calls View Controller" id="G8Q-fI-Hvd" customClass="CallsViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="4Is-ob-9t6"/>
<viewControllerLayoutGuide type="bottom" id="e0a-La-awy"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="qD9-9C-R5e">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
<tabBarItem key="tabBarItem" tag="4" title="" image="tab_calls" id="GAU-Tz-bbH"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="VvR-dH-VJ6" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2908" y="-2819"/>
</scene>
<!--Unified Search View Controller-->
<scene sceneID="ijO-nb-yi4">
<objects>
Expand Down Expand Up @@ -231,6 +250,7 @@
<segue destination="IGB-jr-yFz" kind="relationship" relationship="viewControllers" id="CeF-yL-aO0"/>
<segue destination="HPQ-zg-lZR" kind="relationship" relationship="viewControllers" id="y12-eg-vhO"/>
<segue destination="SLx-Wj-p7E" kind="relationship" relationship="viewControllers" id="MLn-VT-30W"/>
<segue destination="G8Q-fI-Hvd" kind="relationship" relationship="viewControllers" id="8IJ-bE-G5K"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="k1S-FF-3Zu" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -497,12 +517,14 @@
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="Tfl-tq-LQp"/>
<segue reference="bwO-oZ-2vj"/>
<segue reference="f5u-Y1-7nt"/>
</inferredMetricsTieBreakers>
<resources>
<image name="launch_screen_logo" width="240" height="240"/>
<image name="launch_screen_logo" width="20" height="22.5"/>
<image name="search_icon" width="24" height="24"/>
<image name="settings_icon" width="24" height="24"/>
<image name="tab_calls" width="24" height="24"/>
<image name="tab_favourites" width="24" height="24"/>
<image name="tab_groups" width="24" height="24"/>
<image name="tab_home" width="20" height="23.5"/>
Expand All @@ -511,5 +533,8 @@
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "start_call.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "start_call@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "start_call@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"filename" : "tab_calls.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tab_calls@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tab_calls@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Riot/Assets/de.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"title_favourites" = "Favoriten";
"title_people" = "Personen";
"title_rooms" = "Räume";
"title_calls" = "Anrufe";
"warning" = "Warnung";
"remove" = "Entferne";
"start" = "Starte";
Expand Down Expand Up @@ -82,6 +83,7 @@
"room_recents_favourites_section" = "FAVORITEN";
"room_recents_people_section" = "PERSONEN";
"room_recents_conversations_section" = "RÄUME";
"room_recents_calls_section" = "ANRUFE";
"room_recents_no_conversation" = "Keine Räume";
"room_recents_low_priority_section" = "NIEDRIGE PRIORITÄT";
"room_recents_invites_section" = "EINLADUNGEN";
Expand Down Expand Up @@ -1245,6 +1247,8 @@
"rooms_empty_view_title" = "Räume";
"people_empty_view_information" = "Sicher kommunizieren mit allen. Drücke + um Leute hinzuzufügen.";
"people_empty_view_title" = "Leute";
"calls_empty_view_title" = "Anrufe";
"calls_empty_view_information" = "Eingehende und ausgehende Anrufe werden hier gelistet. Drücke + um einen Anruf von der Wähltastatur zu starten.";

// MARK: - Favourites

Expand Down
6 changes: 6 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"title_people" = "People";
"title_rooms" = "Rooms";
"title_groups" = "Communities";
"title_calls" = "Calls";
"warning" = "Warning";

// Actions
Expand Down Expand Up @@ -213,6 +214,7 @@
"room_recents_favourites_section" = "FAVOURITES";
"room_recents_people_section" = "PEOPLE";
"room_recents_conversations_section" = "ROOMS";
"room_recents_calls_section" = "CALLS";
"room_recents_no_conversation" = "No rooms";
"room_recents_low_priority_section" = "LOW PRIORITY";
"room_recents_server_notice_section" = "SYSTEM ALERTS";
Expand All @@ -234,6 +236,10 @@
"people_empty_view_information" = "Chat securely with anyone.
Tap the + to start adding people.";

// Calls tab
"calls_empty_view_title" = "Calls";
"calls_empty_view_information" = "Incoming and outgoing calls are listed here. Tap the + to start a call from the dial pad";

// Rooms tab
"room_directory_no_public_room" = "No public rooms available";

Expand Down
2 changes: 2 additions & 0 deletions Riot/Generated/Images.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ internal class Asset: NSObject {
internal static let shareActionButton = ImageAsset(name: "share_action_button")
internal static let shrinkIcon = ImageAsset(name: "shrink_icon")
internal static let smartphone = ImageAsset(name: "smartphone")
internal static let startCall = ImageAsset(name: "start_call")
internal static let startChat = ImageAsset(name: "start_chat")
internal static let touchidIcon = ImageAsset(name: "touchid_icon")
internal static let addGroupParticipant = ImageAsset(name: "add_group_participant")
Expand Down Expand Up @@ -242,6 +243,7 @@ internal class Asset: NSObject {
internal static let spaceTypeIcon = ImageAsset(name: "space_type_icon")
internal static let spaceUserIcon = ImageAsset(name: "space_user_icon")
internal static let spacesMore = ImageAsset(name: "spaces_more")
internal static let tabCalls = ImageAsset(name: "tab_calls")
internal static let tabFavourites = ImageAsset(name: "tab_favourites")
internal static let tabGroups = ImageAsset(name: "tab_groups")
internal static let tabHome = ImageAsset(name: "tab_home")
Expand Down
16 changes: 16 additions & 0 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,14 @@ public class VectorL10n: NSObject {
public static var callbarReturn: String {
return VectorL10n.tr("Vector", "callbar_return")
}
/// Incoming and outgoing calls are listed here. Tap the + to start a call from the dial pad
public static var callsEmptyViewInformation: String {
return VectorL10n.tr("Vector", "calls_empty_view_information")
}
/// Calls
public static var callsEmptyViewTitle: String {
return VectorL10n.tr("Vector", "calls_empty_view_title")
}
/// Camera
public static var camera: String {
return VectorL10n.tr("Vector", "camera")
Expand Down Expand Up @@ -5351,6 +5359,10 @@ public class VectorL10n: NSObject {
public static var roomPromptResend: String {
return VectorL10n.tr("Vector", "room_prompt_resend")
}
/// CALLS
public static var roomRecentsCallsSection: String {
return VectorL10n.tr("Vector", "room_recents_calls_section")
}
/// ROOMS
public static var roomRecentsConversationsSection: String {
return VectorL10n.tr("Vector", "room_recents_conversations_section")
Expand Down Expand Up @@ -7107,6 +7119,10 @@ public class VectorL10n: NSObject {
public static var `switch`: String {
return VectorL10n.tr("Vector", "switch")
}
/// Calls
public static var titleCalls: String {
return VectorL10n.tr("Vector", "title_calls")
}
/// Copy link to thread
public static var threadCopyLinkToThread: String {
return VectorL10n.tr("Vector", "thread_copy_link_to_thread")
Expand Down
3 changes: 3 additions & 0 deletions Riot/Managers/Settings/RiotSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ final class RiotSettings: NSObject {
@UserDefault(key: "homeScreenShowRoomsTab", defaultValue: BuildSettings.homeScreenShowRoomsTab, storage: defaults)
var homeScreenShowRoomsTab

@UserDefault(key: "homeScreenShowCallsTab", defaultValue: BuildSettings.homeScreenShowCallsTab, storage: defaults)
var homeScreenShowCallsTab

@UserDefault(key: "homeScreenShowCommunitiesTab", defaultValue: BuildSettings.homeScreenShowCommunitiesTab, storage: defaults)
var homeScreenShowCommunitiesTab

Expand Down
37 changes: 37 additions & 0 deletions Riot/Modules/Calls/CallsViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#ifndef CallsViewController_h
#define CallsViewController_h

#import "RecentsViewController.h"

/**
'CallsViewController' instance is used to display/filter the direct rooms and a list of contacts.
*/
@interface CallsViewController : RecentsViewController

+ (instancetype)instantiate;

/**
Scroll the next room with missed notifications to the top.
*/
- (void)scrollToNextRoomWithMissedNotifications;

@end


#endif /* CallsViewController_h */
Loading