Merge pull request #91 from vector-im/issue_80_rageshake_handling

issue_80: Rageshake handling
This commit is contained in:
giomfo
2016-02-11 09:07:33 +01:00
19 changed files with 99 additions and 9 deletions
+3
View File
@@ -37,6 +37,9 @@ extern UIColor *kVectorTextColorBlack;
extern UIColor *kVectorTextColorDarkGray;
extern UIColor *kVectorTextColorGray;
#pragma mark - Vector Navigation Bar Tint Color
extern UIColor *kVectorNavBarTintColor;
/**
`VectorDesignValues` class manages the Vector design parameters
*/
+4
View File
@@ -26,6 +26,8 @@ UIColor *kVectorTextColorBlack;
UIColor *kVectorTextColorDarkGray;
UIColor *kVectorTextColorGray;
UIColor *kVectorNavBarTintColor;
@implementation VectorDesignValues
+ (void)load
@@ -42,6 +44,8 @@ UIColor *kVectorTextColorGray;
kVectorTextColorBlack = [UIColor colorWithRed:(60.0 / 255.0) green:(60.0 / 255.0) blue:(60.0 / 255.0) alpha:1.0];
kVectorTextColorDarkGray = [UIColor colorWithRed:(74.0 / 255.0) green:(74.0 / 255.0) blue:(74.0 / 255.0) alpha:1.0];
kVectorTextColorGray = [UIColor colorWithRed:(157.0 / 255.0) green:(157.0 / 255.0) blue:(157.0 / 255.0) alpha:1.0];
kVectorNavBarTintColor = kVectorColorLightGrey;
// Colors copied from Vector web
kVectorColorLightGreen = UIColorFromRGB(0x50e2c2);
@@ -16,6 +16,8 @@
#import "AccountDetailsViewController.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@interface AccountDetailsViewController()
@@ -34,7 +36,9 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKRoomMemberListViewController` properties
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
}
@@ -40,7 +40,9 @@
{
[super viewDidLoad];
// Setup `MXKAuthenticationViewController` properties
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.mainNavigationItem.title = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
@@ -20,6 +20,10 @@
#import "AppDelegate.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@interface DirectoryViewController ()
{
PublicRoomsDirectoryDataSource *dataSource;
@@ -32,6 +36,11 @@
- (void)viewDidLoad
{
[super viewDidLoad];
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.title = NSLocalizedStringFromTable(@"directory_title", @"Vector", nil);
@@ -16,6 +16,8 @@
#import "GlobalNotificationSettingsViewController.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@implementation GlobalNotificationSettingsViewController
@@ -25,7 +27,9 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKRoomMemberListViewController` properties
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
}
@end
@@ -21,11 +21,20 @@
#import "EventFormatter.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@implementation HomeSearchViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
[self.searchTableView registerNib:HomeSearchTableViewCell.nib forCellReuseIdentifier:HomeSearchTableViewCell.defaultReuseIdentifier];
@@ -66,6 +66,8 @@
[self initWithTitles:titles viewControllers:viewControllers defaultSelected:0];
[super viewDidLoad];
// The navigation bar tint color and the rageShake Manager are handled by super (see SegmentedViewController)
self.navigationItem.title = NSLocalizedStringFromTable(@"title_recents", @"Vector", nil);
@@ -16,6 +16,9 @@
#import "MediaAlbumContentViewController.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@interface MediaAlbumContentViewController ()
{
@@ -55,6 +58,11 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
// Register collection view cell class
[self.assetsCollectionView registerClass:MXKMediaCollectionViewCell.class forCellWithReuseIdentifier:[MXKMediaCollectionViewCell defaultReuseIdentifier]];
@@ -24,6 +24,10 @@
#import "MediaAlbumTableCell.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
static void *CapturingStillImageContext = &CapturingStillImageContext;
static void *RecordingContext = &RecordingContext;
@@ -90,6 +94,11 @@ static void *RecordingContext = &RecordingContext;
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onButtonPressed:)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"camera", @"Vector", nil) style:UIBarButtonItemStylePlain target:self action:@selector(onButtonPressed:)];
@@ -64,7 +64,9 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKRecentListViewController` properties
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
// Register here the customized cell view class used to render recents
@@ -17,6 +17,8 @@
#import "RoomCreationStep1ViewController.h"
#import "RoomCreationStep2ViewController.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
#import "NSBundle+MatrixKit.h"
@@ -55,6 +57,8 @@
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
inputs = [[MXKRoomCreationInputs alloc] init];
@@ -38,6 +38,8 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// The navigation bar tint color and the rageShake Manager are handled by super (see RoomParticipantsViewController)
self.navigationItem.title = NSLocalizedStringFromTable(@"room_creation_title", @"Vector", nil);
createBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedStringFromTable(@"create", @"Vector", nil) style:UIBarButtonItemStylePlain target:self action:@selector(onButtonPressed:)];
@@ -16,11 +16,12 @@
#import "RoomParticipantsViewController.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
#import "AppDelegate.h"
#import "VectorDesignValues.h"
#import "AvatarGenerator.h"
#import "Contact.h"
@@ -69,6 +70,8 @@
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.navigationItem.title = NSLocalizedStringFromTable(@"room_participants_title", @"Vector", nil);
@@ -22,12 +22,20 @@
#import "RoomIncomingAttachmentBubbleCell.h"
#import "RoomIncomingTextMsgBubbleCell.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@implementation RoomSearchViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
// Hide line separators of empty cells
self.searchTableView.tableFooterView = [[UIView alloc] init];
@@ -97,6 +97,11 @@
{
[super viewDidLoad];
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
// TODO use a color panel
// not an hard coded one.
CGFloat item = (242.0f / 255.0);
@@ -104,9 +109,6 @@
self.tableView.backgroundColor = [UIColor colorWithRed:item green:item blue:item alpha:item];
self.tableView.separatorColor = [UIColor clearColor];
// Setup `RoomSettingsViewController` properties
self.rageShakeManager = [RageShakeManager sharedManager];
[self setNavBarButtons];
}
@@ -19,6 +19,9 @@
#import "RoomDataSource.h"
#import "AppDelegate.h"
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
#import "RoomInputToolbarView.h"
@@ -105,6 +108,9 @@
{
[super viewDidLoad];
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
// Register first customized cell view classes used to render bubbles
[self.bubblesTableView registerClass:RoomIncomingTextMsgBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgBubbleCell.defaultReuseIdentifier];
[self.bubblesTableView registerClass:RoomIncomingTextMsgWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgWithoutSenderInfoBubbleCell.defaultReuseIdentifier];
@@ -18,6 +18,8 @@
#import "VectorDesignValues.h"
#import "RageShakeManager.h"
@interface SegmentedViewController ()
{
// list of displayed UIViewControllers
@@ -117,6 +119,11 @@
- (void)viewDidLoad
{
[super viewDidLoad];
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
// Check whether the view controller has been pushed via storyboard
if (!self.viewControllerContainer)
@@ -118,7 +118,9 @@
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Setup `MXKRoomMemberListViewController` properties
// Setup `MXKViewControllerHandling` properties
self.defaultBarTintColor = kVectorNavBarTintColor;
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.tableView.backgroundColor = kVectorColorLightGrey;