Skip to content

Commit

Permalink
Finish v0.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Oct 5, 2018
2 parents 599a119 + 4e260c5 commit 8bb5767
Show file tree
Hide file tree
Showing 18 changed files with 419 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Pods/
# Fastlane
fastlane/report.xml
fastlane/Reports
fastlane/README.md
fastlane/README.md
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Changes in 0.7.5 (2018-10-05)
===============================================

Improvements:
* Upgrade MatrixKit version (v0.8.5).
* Server Quota Notices: Implement the blue banner (#1937).

Changes in 0.7.4 (2018-09-26)
===============================================

Expand Down
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
source "https://rubygems.org"

gem "xcode-install"
gem "fastlane"
gem "cocoapods"
gem "cocoapods", '~>1.5.3'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
14 changes: 10 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ GEM
xcodeproj (>= 1.6.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-versioning (0.3.4)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -133,7 +134,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mini_magick (4.5.1)
minitest (5.8.5)
minitest (5.11.3)
molinillo (0.6.6)
multi_json (1.13.1)
multi_xml (0.6.0)
Expand All @@ -151,7 +152,7 @@ GEM
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
ruby-macho (1.2.0)
ruby-macho (1.3.1)
rubyzip (1.2.2)
security (0.1.3)
signet (0.10.0)
Expand Down Expand Up @@ -179,6 +180,9 @@ GEM
unf_ext (0.0.7.5)
unicode-display_width (1.4.0)
word_wrap (1.0.0)
xcode-install (2.4.4)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.6.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
Expand All @@ -194,8 +198,10 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods
cocoapods (~> 1.5.3)
fastlane
fastlane-plugin-versioning
xcode-install

BUNDLED WITH
1.16.4
1.16.2
12 changes: 1 addition & 11 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source 'https://github.com/CocoaPods/Specs.git'

# Different flavours of pods to MatrixKit
# The current MatrixKit pod version
$matrixKitVersion = '0.8.4'
$matrixKitVersion = '0.8.5'

# The develop branch version
#$matrixKitVersion = 'develop'
Expand Down Expand Up @@ -102,16 +102,6 @@ post_install do |installer|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '4.0' # Required for PiwikTracker. Should be removed
end

# Set the right identity to build pods frameworks to be able to make release builds
# See https://github.com/CocoaPods/CocoaPods/issues/3156#issuecomment-102022787
if target.to_s.include? 'Pods'
target.build_configurations.each do |config|
if !config.to_s.include? 'Debug'
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution'
end
end
end
end
end

34 changes: 17 additions & 17 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,37 @@ PODS:
- GZIP (1.2.2)
- HPGrowingTextView (1.1)
- libPhoneNumber-iOS (0.9.13)
- MatrixKit (0.8.4):
- MatrixKit (0.8.5):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.21)
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixKit/Core (= 0.8.4)
- MatrixSDK (= 0.11.4)
- MatrixKit/AppExtension (0.8.4):
- MatrixKit/Core (= 0.8.5)
- MatrixSDK (= 0.11.5)
- MatrixKit/AppExtension (0.8.5):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.21)
- DTCoreText/Extension
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.11.4)
- MatrixKit/Core (0.8.4):
- MatrixSDK (= 0.11.5)
- MatrixKit/Core (0.8.5):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.21)
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.11.4)
- MatrixSDK (0.11.4):
- MatrixSDK/Core (= 0.11.4)
- MatrixSDK/Core (0.11.4):
- MatrixSDK (= 0.11.5)
- MatrixSDK (0.11.5):
- MatrixSDK/Core (= 0.11.5)
- MatrixSDK/Core (0.11.5):
- AFNetworking (~> 3.2.0)
- GZIP (~> 1.2.1)
- OLMKit (~> 2.3.0)
- Realm (~> 3.9.0)
- MatrixSDK/JingleCallStack (0.11.4):
- MatrixSDK/JingleCallStack (0.11.5):
- MatrixSDK/Core
- WebRTC (= 63.11.20455)
- MatrixSDK/SwiftSupport (0.11.4):
- MatrixSDK/SwiftSupport (0.11.5):
- MatrixSDK/Core
- OLMKit (2.3.0):
- OLMKit/olmc (= 2.3.0)
Expand All @@ -92,8 +92,8 @@ DEPENDENCIES:
- cmark
- DTCoreText
- GBDeviceInfo (~> 5.2.0)
- MatrixKit (= 0.8.4)
- MatrixKit/AppExtension (= 0.8.4)
- MatrixKit (= 0.8.5)
- MatrixKit/AppExtension (= 0.8.5)
- MatrixSDK/JingleCallStack
- MatrixSDK/SwiftSupport
- OLMKit
Expand Down Expand Up @@ -134,13 +134,13 @@ SPEC CHECKSUMS:
GZIP: 12374d285e3b5d46cfcd480700fcfc7e16caf4f1
HPGrowingTextView: 88a716d97fb853bcb08a4a08e4727da17efc9b19
libPhoneNumber-iOS: e444379ac18bbfbdefad571da735b2cd7e096caa
MatrixKit: 33f4361bd62342b6cdacb79fd60f3d9d704366b1
MatrixSDK: 9d9f5e9b1fa19f8a84ebfce846d87b138af9999b
MatrixKit: 475ded18f6e1ca6e2461467540fb58b2822deb04
MatrixSDK: 71c30d30fa258c2d8b79298bf9f0d38718d78ff3
OLMKit: dd79cdc5fab9ec04c940a901e025195b7801f306
PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf
Realm: 3d36f208bf3aff8335dc3298742140182bde4edb
WebRTC: f2a6203584745fe53532633397557876b5d71640

PODFILE CHECKSUM: 9085b1000f60244804f8bc6285a05a39a4795d76
PODFILE CHECKSUM: 80264d2625b7551d0278cd95f0eb29ef43269cb0

COCOAPODS: 1.6.0.beta.1
4 changes: 4 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@
"room_resource_limit_exceeded_message_contact_1" = " Please ";
"room_resource_limit_exceeded_message_contact_2_link" = "contact your service administrator";
"room_resource_limit_exceeded_message_contact_3" = " to continue using this service.";
"room_resource_usage_limit_reached_message_1_default" = "This homeserver has exceeded one of its resource limits so ";
"room_resource_usage_limit_reached_message_1_monthly_active_user" = "This homeserver has hit its Monthly Active User limit so ";
"room_resource_usage_limit_reached_message_2" = "some users will not be able to log in.";
"room_resource_usage_limit_reached_message_contact_3" = " to get this limit increased.";

// Unknown devices
"unknown_devices_alert_title" = "Room contains unknown devices";
Expand Down
1 change: 1 addition & 0 deletions Riot/Constants/RiotDesignValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ extern UIColor *kRiotColorRed;
extern UIColor *kRiotColorIndigo;
extern UIColor *kRiotColorOrange;
extern UIColor *kRiotColorBlue;
extern UIColor *kRiotColorCuriousBlue;

#pragma mark - Riot Standard Room Member Power Level
extern NSInteger const kRiotRoomModeratorLevel;
Expand Down
4 changes: 3 additions & 1 deletion Riot/Constants/RiotDesignValues.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
UIColor *kRiotColorIndigo;
UIColor *kRiotColorOrange;
UIColor *kRiotColorBlue;
UIColor *kRiotColorCuriousBlue;

// Riot Background Colors
UIColor *kRiotBgColorWhite;
Expand Down Expand Up @@ -101,7 +102,8 @@ + (void)load
kRiotColorIndigo = UIColorFromRGB(0xBD79CC);
kRiotColorOrange = UIColorFromRGB(0xF8A15F);
kRiotColorBlue = UIColorFromRGB(0x81BDDB);

kRiotColorCuriousBlue = UIColorFromRGB(0x2A9EDB);

kRiotBgColorWhite = [UIColor whiteColor];
kRiotBgColorBlack = UIColorFromRGB(0x2D2D2D);
kRiotBgColorOLEDBlack = [UIColor blackColor];
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/Room/RoomViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#import "UIViewController+RiotSearch.h"

@interface RoomViewController : MXKRoomViewController <UISearchBarDelegate, UIGestureRecognizerDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate>
@interface RoomViewController : MXKRoomViewController

// The expanded header
@property (weak, nonatomic) IBOutlet UIView *expandedHeaderContainer;
Expand Down
48 changes: 47 additions & 1 deletion Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

#import "Riot-Swift.h"

@interface RoomViewController ()
@interface RoomViewController () <UISearchBarDelegate, UIGestureRecognizerDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate, MXServerNoticesDelegate>
{
// The expanded header
ExpandedRoomTitleView *expandedHeader;
Expand Down Expand Up @@ -211,6 +211,9 @@ @interface RoomViewController ()

// Listener for `m.room.tombstone` event type
id tombstoneEventNotificationsListener;

// Homeserver notices
MXServerNotices *serverNotices;
}

@end
Expand Down Expand Up @@ -821,6 +824,8 @@ - (void)displayRoom:(MXKRoomDataSource *)dataSource

if (self.roomDataSource)
{
[self listenToServerNotices];

self.eventsAcknowledgementEnabled = YES;

// Set room title view
Expand Down Expand Up @@ -1166,6 +1171,7 @@ - (void)destroy
[self removeWidgetNotificationsListeners];
[self removeTombstoneEventNotificationsListener];
[self removeMXSessionStateChangeNotificationsListener];
[self removeServerNoticesListener];

if (previewHeader || (self.expandedHeaderContainer.isHidden == NO))
{
Expand Down Expand Up @@ -3810,6 +3816,32 @@ - (void)listenCallNotifications
}];
}


#pragma mark - Server notices management

- (void)removeServerNoticesListener
{
if (serverNotices)
{
[serverNotices close];
serverNotices = nil;
}
}

- (void)listenToServerNotices
{
if (!serverNotices)
{
serverNotices = [[MXServerNotices alloc] initWithMatrixSession:self.roomDataSource.mxSession];
serverNotices.delegate = self;
}
}

- (void)serverNoticesDidChangeState:(MXServerNotices *)serverNotices
{
[self refreshActivitiesViewDisplay];
}

#pragma mark - Widget notifications management

- (void)removeWidgetNotificationsListeners
Expand Down Expand Up @@ -4026,6 +4058,20 @@ - (void)refreshActivitiesViewDisplay

}];
}
else if (serverNotices.usageLimit && serverNotices.usageLimit.isServerNoticeUsageLimit)
{
[roomActivitiesView showResourceUsageLimitNotice:serverNotices.usageLimit onAdminContactTapped:^(NSURL *adminContact) {

if ([[UIApplication sharedApplication] canOpenURL:adminContact])
{
[[UIApplication sharedApplication] openURL:adminContact];
}
else
{
NSLog(@"[RoomVC] refreshActivitiesViewDisplay: adminContact(%@) cannot be opened", adminContact);
}
}];
}
else
{
[self refreshTypingNotification];
Expand Down
8 changes: 8 additions & 0 deletions Riot/Modules/Room/Views/Activities/RoomActivitiesView.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@
*/
- (void)showResourceLimitExceededError:(NSDictionary *)errorDict onAdminContactTapped:(void (^)(NSURL *adminContact))onAdminContactTapped;

/**
Display a usage limit notice sent in a system alert room.
@param usageLimit the usage limit data.
@param onAdminContactTapped a callback indicating if the user wants to contact their admin.
*/
- (void)showResourceUsageLimitNotice:(MXServerNoticeContent *)usageLimit onAdminContactTapped:(void (^)(NSURL *adminContact))onAdminContactTapped;

/**
Remove any displayed information.
*/
Expand Down
Loading

0 comments on commit 8bb5767

Please sign in to comment.