Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Commit 51677cd

Browse files
committed
Resolved conflicts with develop
2 parents 2125e12 + 4a9b767 commit 51677cd

10 files changed

Lines changed: 169 additions & 132 deletions

File tree

Rocket.Chat.ShareExtension/Resources/pl.lproj/Localizable.strings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
"compose.title" = "Udostępnij";
2424
"compose.send" = "Wyślij";
25-
"compose.cancel" = "Cancel"; //TODO
25+
"compose.cancel" = "Anuluj";
2626
"compose.destination.to" = "Do: ";
2727
"compose.file.name.placeholder" = "Nazwa pliku";
2828
"compose.file.description.placeholder" = "Opis pliku";
@@ -31,4 +31,4 @@
3131
"report.success.message" = "Wybrany plik został poprawnie udostępniony.";
3232
"report.error.title" = "Błąd";
3333
"report.error.message" = "Wystąpił błąd w czasie wysyłania pliku.";
34-
"report.cancelled.message" = "You cancelled the request. The message wasn't sent."; //TODO
34+
"report.cancelled.message" = "Anulowano żądanie. Wiadomość nie została wysłana.";

Rocket.Chat/Controllers/Chat/MessagesViewControllerComposerDelegate.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ extension MessagesViewController: ComposerViewExpandedDelegate {
3636
// MARK: Hints
3737

3838
func composerView(_ composerView: ComposerView, didChangeHintPrefixedWord word: String) {
39+
40+
// Don't generate hints if it is a slash command and not the first word
41+
if word.first == "/" && composerView.textView.text != word {
42+
return
43+
}
44+
3945
composerViewModel.didChangeHintPrefixedWord(word: word)
4046

4147
if composerViewModel.hints.count > 0 {

Rocket.Chat/Controllers/Preferences/Notifications/NotificationsChooseCell.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ final class NotificationsChooseCell: UITableViewCell, NotificationsCellProtocol
4141

4242
titleLabel.text = model.title
4343

44+
model.value.clearListeners()
4445
model.value.bindAndFire { [unowned self] value in
4546
self.valueLabel.text = value.localizedCase
4647
}
4748

49+
model.pickerVisible.clearListeners()
4850
model.pickerVisible.bindAndFire { [unowned self] visible in
4951
self.pickerView.isHidden = !visible
5052

@@ -65,10 +67,12 @@ final class NotificationsChooseCell: UITableViewCell, NotificationsCellProtocol
6567

6668
titleLabel.text = model.title
6769

70+
model.value.clearListeners()
6871
model.value.bindAndFire { [unowned self] value in
6972
self.valueLabel.text = value.localizedCase
7073
}
7174

75+
model.pickerVisible.clearListeners()
7276
model.pickerVisible.bindAndFire { [unowned self] visible in
7377
self.pickerView.isHidden = !visible
7478

@@ -89,10 +93,12 @@ final class NotificationsChooseCell: UITableViewCell, NotificationsCellProtocol
8993

9094
titleLabel.text = model.title
9195

96+
model.value.clearListeners()
9297
model.value.bindAndFire { [unowned self] value in
9398
self.valueLabel.text = value == 0 ? localized("myaccount.settings.notifications.duration.default") : "\(value) \(localized("myaccount.settings.notifications.duration.seconds"))"
9499
}
95100

101+
model.pickerVisible.clearListeners()
96102
model.pickerVisible.bindAndFire { [unowned self] visible in
97103
self.pickerView.isHidden = !visible
98104

Rocket.Chat/External/RCEmojiKit/pl.lproj/RCEmojiKit.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
"categories.symbols" = "SYMBOLE";
2121
"categories.flags" = "FLAGI";
2222

23-
"reactorlist.title" = "Reactions"; //TODO
23+
"reactorlist.title" = "Reakcje";

Rocket.Chat/Helpers/Dynamic.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ import Foundation
1010

1111
class Dynamic<T> {
1212
typealias Listener = (T) -> Void
13-
var listeners = [Listener?]()
13+
private var listeners = [Listener?]()
1414

1515
func bind(_ listener: Listener?) {
16-
self.listeners.append(listener)
16+
listeners.append(listener)
1717
}
1818

1919
func bindAndFire(_ listener: Listener?) {
20-
self.listeners.append(listener)
20+
listeners.append(listener)
2121
listener?(value)
2222
}
2323

24+
func clearListeners() {
25+
listeners.removeAll()
26+
}
27+
2428
var value: T {
2529
didSet {
2630
listeners.forEach { listener in

Rocket.Chat/Resources/pl.lproj/Localizable.strings

Lines changed: 111 additions & 111 deletions
Large diffs are not rendered by default.

Rocket.Chat/Theme/ThemeableViews.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ extension AudioView {
516516

517517
extension MBProgressHUD {
518518
override var theme: Theme? { return nil }
519+
override func applyTheme() {
520+
super.applyTheme()
521+
bezelView.color = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
522+
}
519523
}
520524

521525
// MARK: Subclasses

Rocket.Chat/Views/Chat/ChatTitleView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ final class ChatTitleView: UIView {
2323
}
2424
}
2525

26+
@IBOutlet weak var titleScrollView: UIScrollView!
2627
@IBOutlet weak var titleLabel: UILabel!
2728
@IBOutlet weak var titleImage: UIImageView!
2829
@IBOutlet weak var showInfoImage: UIImageView!
@@ -39,6 +40,7 @@ final class ChatTitleView: UIView {
3940

4041
set {
4142
viewStatus.isHidden = newValue
43+
titleScrollView.isHidden = newValue
4244
titleLabel.isHidden = newValue
4345
titleImage.isHidden = newValue
4446
showInfoImage.isHidden = newValue

Rocket.Chat/Views/Chat/ChatTitleView.xib

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,29 @@
6262
<constraint firstAttribute="height" constant="12" id="wI9-JE-wuq"/>
6363
</constraints>
6464
</imageView>
65-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d1M-6e-vj0">
65+
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ns2-l0-1Px">
6666
<rect key="frame" x="27" y="0.0" width="41.5" height="19.5"/>
67-
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
68-
<nil key="textColor"/>
69-
<nil key="highlightedColor"/>
70-
<userDefinedRuntimeAttributes>
71-
<userDefinedRuntimeAttribute type="string" keyPath="themeColor" value="textColor: bodyText"/>
72-
</userDefinedRuntimeAttributes>
73-
</label>
67+
<subviews>
68+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d1M-6e-vj0">
69+
<rect key="frame" x="0.0" y="0.0" width="41.5" height="19.5"/>
70+
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
71+
<nil key="textColor"/>
72+
<nil key="highlightedColor"/>
73+
<userDefinedRuntimeAttributes>
74+
<userDefinedRuntimeAttribute type="string" keyPath="themeColor" value="textColor: bodyText"/>
75+
</userDefinedRuntimeAttributes>
76+
</label>
77+
</subviews>
78+
<constraints>
79+
<constraint firstAttribute="bottom" secondItem="d1M-6e-vj0" secondAttribute="bottom" id="02f-ZL-aM4"/>
80+
<constraint firstAttribute="width" secondItem="d1M-6e-vj0" secondAttribute="width" priority="250" id="4dL-0T-2Gj"/>
81+
<constraint firstAttribute="width" relation="greaterThanOrEqual" id="PDN-8v-zLq"/>
82+
<constraint firstAttribute="trailing" secondItem="d1M-6e-vj0" secondAttribute="trailing" id="bB0-BN-N6l"/>
83+
<constraint firstItem="d1M-6e-vj0" firstAttribute="leading" secondItem="ns2-l0-1Px" secondAttribute="leading" id="eHA-0K-ywk"/>
84+
<constraint firstItem="d1M-6e-vj0" firstAttribute="top" secondItem="ns2-l0-1Px" secondAttribute="top" id="hMX-hY-BfQ"/>
85+
<constraint firstAttribute="height" secondItem="d1M-6e-vj0" secondAttribute="height" id="oaT-6N-wF1"/>
86+
</constraints>
87+
</scrollView>
7488
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bLg-FB-vXv">
7589
<rect key="frame" x="8" y="19.5" width="327" height="14.5"/>
7690
<fontDescription key="fontDescription" type="system" pointSize="12"/>
@@ -89,19 +103,18 @@
89103
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
90104
<constraints>
91105
<constraint firstItem="4Ah-8t-4MZ" firstAttribute="centerX" secondItem="r2R-yy-EGi" secondAttribute="centerX" id="3Am-Zf-cEY"/>
92-
<constraint firstItem="r2R-yy-EGi" firstAttribute="centerY" secondItem="d1M-6e-vj0" secondAttribute="centerY" id="4gI-vW-2zi"/>
93-
<constraint firstItem="qdc-h6-oM3" firstAttribute="centerY" secondItem="d1M-6e-vj0" secondAttribute="centerY" id="5OS-tR-6Yv"/>
94-
<constraint firstItem="d1M-6e-vj0" firstAttribute="top" secondItem="F2i-rU-dxW" secondAttribute="top" id="7Oa-HK-RhK"/>
106+
<constraint firstItem="ns2-l0-1Px" firstAttribute="leading" secondItem="r2R-yy-EGi" secondAttribute="trailing" constant="4" id="55q-rG-X9b"/>
95107
<constraint firstAttribute="bottom" secondItem="bLg-FB-vXv" secondAttribute="bottom" id="A60-HQ-QRT"/>
96108
<constraint firstItem="r2R-yy-EGi" firstAttribute="leading" secondItem="F2i-rU-dxW" secondAttribute="leadingMargin" id="COl-CQ-in6"/>
109+
<constraint firstItem="qdc-h6-oM3" firstAttribute="leading" secondItem="ns2-l0-1Px" secondAttribute="trailing" constant="8" id="GeQ-7H-8jx"/>
110+
<constraint firstItem="bLg-FB-vXv" firstAttribute="top" secondItem="ns2-l0-1Px" secondAttribute="bottom" id="IWQ-hE-gAR"/>
97111
<constraint firstItem="4Ah-8t-4MZ" firstAttribute="centerY" secondItem="r2R-yy-EGi" secondAttribute="centerY" id="NWV-sz-cVT"/>
98112
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="qdc-h6-oM3" secondAttribute="trailing" id="P3U-aA-vZn"/>
99-
<constraint firstItem="qdc-h6-oM3" firstAttribute="leading" secondItem="d1M-6e-vj0" secondAttribute="trailing" constant="8" id="SU1-gG-cyt"/>
100-
<constraint firstItem="d1M-6e-vj0" firstAttribute="leading" secondItem="r2R-yy-EGi" secondAttribute="trailing" constant="4" id="iVT-QY-FmK"/>
101-
<constraint firstItem="bLg-FB-vXv" firstAttribute="top" secondItem="d1M-6e-vj0" secondAttribute="bottom" id="ixP-rb-MIZ"/>
102-
<constraint firstItem="d1M-6e-vj0" firstAttribute="top" secondItem="F2i-rU-dxW" secondAttribute="top" id="ntj-cD-NJA"/>
113+
<constraint firstItem="ns2-l0-1Px" firstAttribute="centerY" secondItem="qdc-h6-oM3" secondAttribute="centerY" id="U4h-ZC-5eS"/>
114+
<constraint firstItem="ns2-l0-1Px" firstAttribute="top" secondItem="F2i-rU-dxW" secondAttribute="top" id="dVA-Ws-cR5"/>
103115
<constraint firstItem="bLg-FB-vXv" firstAttribute="leading" secondItem="F2i-rU-dxW" secondAttribute="leadingMargin" id="pKb-vZ-ZP9"/>
104116
<constraint firstAttribute="trailingMargin" secondItem="bLg-FB-vXv" secondAttribute="trailing" id="vM5-rU-2bo"/>
117+
<constraint firstItem="ns2-l0-1Px" firstAttribute="centerY" secondItem="r2R-yy-EGi" secondAttribute="centerY" id="vfK-X0-FE9"/>
105118
</constraints>
106119
</view>
107120
</subviews>
@@ -122,6 +135,7 @@
122135
<outlet property="showInfoImage" destination="qdc-h6-oM3" id="BdC-1F-9ki"/>
123136
<outlet property="titleImage" destination="r2R-yy-EGi" id="n8v-Bh-KBD"/>
124137
<outlet property="titleLabel" destination="d1M-6e-vj0" id="N3K-Oi-icf"/>
138+
<outlet property="titleScrollView" destination="ns2-l0-1Px" id="ka7-8d-zxv"/>
125139
<outlet property="typingLabel" destination="bLg-FB-vXv" id="bcb-ji-CuS"/>
126140
<outlet property="viewLoading" destination="oSA-hf-f6V" id="Sah-7o-vW8"/>
127141
<outlet property="viewStatus" destination="4Ah-8t-4MZ" id="xZe-MG-kNI"/>

Rocket.ChatTests/Views/Chat/ChatTitleViewSpec.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class ChatTitleViewSpec: XCTestCase {
6767
}
6868

6969
instance.isTitleHidden = true
70+
XCTAssertTrue(instance.titleScrollView.isHidden, "titleScrollView should be hidden")
7071
XCTAssertTrue(instance.titleLabel.isHidden, "titleLabel should be hidden")
7172
XCTAssertTrue(instance.titleImage.isHidden, "titleImage should be hidden")
7273
XCTAssertTrue(instance.showInfoImage.isHidden, "showInfoImage should be hidden")

0 commit comments

Comments
 (0)