Renaming:

ConsoleTools -> MXCTools
ConsoleGrowingTextView -> MXCGrowingTextView
CustomImageView -> MXCImageView
CustomAlert -> MXCAlert
MemberActionsCell -> RoomMemberActionsCell
This commit is contained in:
giomfo 2015-01-23 13:46:27 +01:00
parent fbc69f24b1
commit 86d464a7f5
23 changed files with 178 additions and 180 deletions

View file

@ -7,13 +7,13 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
710210A41A67A4B600364868 /* ConsoleGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 710210A31A67A4B600364868 /* ConsoleGrowingTextView.m */; }; 710210A41A67A4B600364868 /* MXCGrowingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 710210A31A67A4B600364868 /* MXCGrowingTextView.m */; };
71193D241A6D64F900E59A9E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71193D231A6D64F900E59A9E /* AddressBook.framework */; }; 71193D241A6D64F900E59A9E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71193D231A6D64F900E59A9E /* AddressBook.framework */; };
71D2E4EC1A49814B000DE015 /* MemberActionsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 71D2E4EB1A49814B000DE015 /* MemberActionsCell.m */; }; 71D2E4EC1A49814B000DE015 /* RoomMemberActionsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 71D2E4EB1A49814B000DE015 /* RoomMemberActionsCell.m */; };
71DB9DC11A495B6400504A09 /* MemberViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DB9DC01A495B6400504A09 /* MemberViewController.m */; }; 71DB9DC11A495B6400504A09 /* MemberViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DB9DC01A495B6400504A09 /* MemberViewController.m */; };
71E94A771A5C4020009F52E5 /* PieChartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E94A761A5C4020009F52E5 /* PieChartView.m */; }; 71E94A771A5C4020009F52E5 /* PieChartView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E94A761A5C4020009F52E5 /* PieChartView.m */; };
D648B86A591308736E2D4078 /* libPods-matrixConsole.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8141B1E2401FFCC3C5B99234 /* libPods-matrixConsole.a */; }; D648B86A591308736E2D4078 /* libPods-matrixConsole.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8141B1E2401FFCC3C5B99234 /* libPods-matrixConsole.a */; };
F00B5DB91A1B9BCE00EA1C8D /* CustomImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F00B5DB81A1B9BCE00EA1C8D /* CustomImageView.m */; }; F00B5DB91A1B9BCE00EA1C8D /* MXCImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F00B5DB81A1B9BCE00EA1C8D /* MXCImageView.m */; };
F013EEEC1A40D437002BB093 /* matrixConsole-Defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = F013EEEB1A40D437002BB093 /* matrixConsole-Defaults.plist */; }; F013EEEC1A40D437002BB093 /* matrixConsole-Defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = F013EEEB1A40D437002BB093 /* matrixConsole-Defaults.plist */; };
F01628C119E29C660071C473 /* default-profile.png in Resources */ = {isa = PBXBuildFile; fileRef = F01628BC19E29C660071C473 /* default-profile.png */; }; F01628C119E29C660071C473 /* default-profile.png in Resources */ = {isa = PBXBuildFile; fileRef = F01628BC19E29C660071C473 /* default-profile.png */; };
F01628C319E29C660071C473 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = F01628BE19E29C660071C473 /* logo.png */; }; F01628C319E29C660071C473 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = F01628BE19E29C660071C473 /* logo.png */; };
@ -21,12 +21,12 @@
F021FBEF1A5EF57300EA3AE6 /* MediaLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = F021FBEE1A5EF57300EA3AE6 /* MediaLoader.m */; }; F021FBEF1A5EF57300EA3AE6 /* MediaLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = F021FBEE1A5EF57300EA3AE6 /* MediaLoader.m */; };
F021FBF21A5F1F8E00EA3AE6 /* MediaManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */; }; F021FBF21A5F1F8E00EA3AE6 /* MediaManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */; };
F024098219E7D177006E741B /* tab_recents@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F024098119E7D177006E741B /* tab_recents@2x.png */; }; F024098219E7D177006E741B /* tab_recents@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F024098119E7D177006E741B /* tab_recents@2x.png */; };
F02900BB1A63C71E00356F7D /* ConsoleTools.m in Sources */ = {isa = PBXBuildFile; fileRef = F02900BA1A63C71E00356F7D /* ConsoleTools.m */; }; F02900BB1A63C71E00356F7D /* MXCTools.m in Sources */ = {isa = PBXBuildFile; fileRef = F02900BA1A63C71E00356F7D /* MXCTools.m */; };
F02BCE231A1A5A2B00543B47 /* play.png in Resources */ = {isa = PBXBuildFile; fileRef = F02BCE221A1A5A2B00543B47 /* play.png */; }; F02BCE231A1A5A2B00543B47 /* play.png in Resources */ = {isa = PBXBuildFile; fileRef = F02BCE221A1A5A2B00543B47 /* play.png */; };
F02D707619F1DC9E007B47D3 /* RoomMemberTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */; }; F02D707619F1DC9E007B47D3 /* RoomMemberTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */; };
F030974C1A6580D70090BC00 /* icon_keyboard.png in Resources */ = {isa = PBXBuildFile; fileRef = F030974A1A6580D70090BC00 /* icon_keyboard.png */; }; F030974C1A6580D70090BC00 /* icon_keyboard.png in Resources */ = {isa = PBXBuildFile; fileRef = F030974A1A6580D70090BC00 /* icon_keyboard.png */; };
F030974D1A6580D70090BC00 /* icon_keyboard@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F030974B1A6580D70090BC00 /* icon_keyboard@2x.png */; }; F030974D1A6580D70090BC00 /* icon_keyboard@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F030974B1A6580D70090BC00 /* icon_keyboard@2x.png */; };
F03C47111A02952800E445AB /* CustomAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F03C47101A02952800E445AB /* CustomAlert.m */; }; F03C47111A02952800E445AB /* MXCAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F03C47101A02952800E445AB /* MXCAlert.m */; };
F03EF5F619F171EB00A0EE52 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5EB19F171EB00A0EE52 /* HomeViewController.m */; }; F03EF5F619F171EB00A0EE52 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5EB19F171EB00A0EE52 /* HomeViewController.m */; };
F03EF5F719F171EB00A0EE52 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5ED19F171EB00A0EE52 /* LoginViewController.m */; }; F03EF5F719F171EB00A0EE52 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5ED19F171EB00A0EE52 /* LoginViewController.m */; };
F03EF5F819F171EB00A0EE52 /* MasterTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5EF19F171EB00A0EE52 /* MasterTabBarController.m */; }; F03EF5F819F171EB00A0EE52 /* MasterTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = F03EF5EF19F171EB00A0EE52 /* MasterTabBarController.m */; };
@ -71,19 +71,19 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
13057A57E74FD5504196F47F /* Pods-matrixConsole.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matrixConsole.release.xcconfig"; path = "Pods/Target Support Files/Pods-matrixConsole/Pods-matrixConsole.release.xcconfig"; sourceTree = "<group>"; }; 13057A57E74FD5504196F47F /* Pods-matrixConsole.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matrixConsole.release.xcconfig"; path = "Pods/Target Support Files/Pods-matrixConsole/Pods-matrixConsole.release.xcconfig"; sourceTree = "<group>"; };
710210A21A67A4B600364868 /* ConsoleGrowingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleGrowingTextView.h; sourceTree = "<group>"; }; 710210A21A67A4B600364868 /* MXCGrowingTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXCGrowingTextView.h; sourceTree = "<group>"; };
710210A31A67A4B600364868 /* ConsoleGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleGrowingTextView.m; sourceTree = "<group>"; }; 710210A31A67A4B600364868 /* MXCGrowingTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXCGrowingTextView.m; sourceTree = "<group>"; };
71193D231A6D64F900E59A9E /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; 71193D231A6D64F900E59A9E /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
71D2E4EA1A49814B000DE015 /* MemberActionsCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberActionsCell.h; sourceTree = "<group>"; }; 71D2E4EA1A49814B000DE015 /* RoomMemberActionsCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomMemberActionsCell.h; sourceTree = "<group>"; };
71D2E4EB1A49814B000DE015 /* MemberActionsCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberActionsCell.m; sourceTree = "<group>"; }; 71D2E4EB1A49814B000DE015 /* RoomMemberActionsCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomMemberActionsCell.m; sourceTree = "<group>"; };
71DB9DBF1A495B6400504A09 /* MemberViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberViewController.h; sourceTree = "<group>"; }; 71DB9DBF1A495B6400504A09 /* MemberViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemberViewController.h; sourceTree = "<group>"; };
71DB9DC01A495B6400504A09 /* MemberViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberViewController.m; sourceTree = "<group>"; }; 71DB9DC01A495B6400504A09 /* MemberViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MemberViewController.m; sourceTree = "<group>"; };
71E94A751A5C4020009F52E5 /* PieChartView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieChartView.h; sourceTree = "<group>"; }; 71E94A751A5C4020009F52E5 /* PieChartView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PieChartView.h; sourceTree = "<group>"; };
71E94A761A5C4020009F52E5 /* PieChartView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PieChartView.m; sourceTree = "<group>"; }; 71E94A761A5C4020009F52E5 /* PieChartView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PieChartView.m; sourceTree = "<group>"; };
8141B1E2401FFCC3C5B99234 /* libPods-matrixConsole.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-matrixConsole.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 8141B1E2401FFCC3C5B99234 /* libPods-matrixConsole.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-matrixConsole.a"; sourceTree = BUILT_PRODUCTS_DIR; };
B7EC7E45C718BF2BBCE0CF48 /* Pods-matrixConsole.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matrixConsole.debug.xcconfig"; path = "Pods/Target Support Files/Pods-matrixConsole/Pods-matrixConsole.debug.xcconfig"; sourceTree = "<group>"; }; B7EC7E45C718BF2BBCE0CF48 /* Pods-matrixConsole.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-matrixConsole.debug.xcconfig"; path = "Pods/Target Support Files/Pods-matrixConsole/Pods-matrixConsole.debug.xcconfig"; sourceTree = "<group>"; };
F00B5DB71A1B9BCE00EA1C8D /* CustomImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageView.h; sourceTree = "<group>"; }; F00B5DB71A1B9BCE00EA1C8D /* MXCImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXCImageView.h; sourceTree = "<group>"; };
F00B5DB81A1B9BCE00EA1C8D /* CustomImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomImageView.m; sourceTree = "<group>"; }; F00B5DB81A1B9BCE00EA1C8D /* MXCImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXCImageView.m; sourceTree = "<group>"; };
F013EEEB1A40D437002BB093 /* matrixConsole-Defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "matrixConsole-Defaults.plist"; sourceTree = "<group>"; }; F013EEEB1A40D437002BB093 /* matrixConsole-Defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "matrixConsole-Defaults.plist"; sourceTree = "<group>"; };
F01628BC19E29C660071C473 /* default-profile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "default-profile.png"; sourceTree = "<group>"; }; F01628BC19E29C660071C473 /* default-profile.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "default-profile.png"; sourceTree = "<group>"; };
F01628BE19E29C660071C473 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; }; F01628BE19E29C660071C473 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
@ -94,15 +94,15 @@
F021FBF01A5F1F8E00EA3AE6 /* MediaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaManager.h; sourceTree = "<group>"; }; F021FBF01A5F1F8E00EA3AE6 /* MediaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaManager.h; sourceTree = "<group>"; };
F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MediaManager.m; sourceTree = "<group>"; }; F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MediaManager.m; sourceTree = "<group>"; };
F024098119E7D177006E741B /* tab_recents@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_recents@2x.png"; sourceTree = "<group>"; }; F024098119E7D177006E741B /* tab_recents@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_recents@2x.png"; sourceTree = "<group>"; };
F02900B91A63C71E00356F7D /* ConsoleTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleTools.h; sourceTree = "<group>"; }; F02900B91A63C71E00356F7D /* MXCTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXCTools.h; sourceTree = "<group>"; };
F02900BA1A63C71E00356F7D /* ConsoleTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleTools.m; sourceTree = "<group>"; }; F02900BA1A63C71E00356F7D /* MXCTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXCTools.m; sourceTree = "<group>"; };
F02BCE221A1A5A2B00543B47 /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = "<group>"; }; F02BCE221A1A5A2B00543B47 /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = "<group>"; };
F02D707419F1DC9E007B47D3 /* RoomMemberTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomMemberTableCell.h; sourceTree = "<group>"; }; F02D707419F1DC9E007B47D3 /* RoomMemberTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomMemberTableCell.h; sourceTree = "<group>"; };
F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomMemberTableCell.m; sourceTree = "<group>"; }; F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomMemberTableCell.m; sourceTree = "<group>"; };
F030974A1A6580D70090BC00 /* icon_keyboard.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_keyboard.png; sourceTree = "<group>"; }; F030974A1A6580D70090BC00 /* icon_keyboard.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_keyboard.png; sourceTree = "<group>"; };
F030974B1A6580D70090BC00 /* icon_keyboard@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_keyboard@2x.png"; sourceTree = "<group>"; }; F030974B1A6580D70090BC00 /* icon_keyboard@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_keyboard@2x.png"; sourceTree = "<group>"; };
F03C470F1A02952800E445AB /* CustomAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomAlert.h; sourceTree = "<group>"; }; F03C470F1A02952800E445AB /* MXCAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MXCAlert.h; sourceTree = "<group>"; };
F03C47101A02952800E445AB /* CustomAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomAlert.m; sourceTree = "<group>"; }; F03C47101A02952800E445AB /* MXCAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MXCAlert.m; sourceTree = "<group>"; };
F03EF5EA19F171EB00A0EE52 /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; }; F03EF5EA19F171EB00A0EE52 /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeViewController.h; sourceTree = "<group>"; };
F03EF5EB19F171EB00A0EE52 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; F03EF5EB19F171EB00A0EE52 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
F03EF5EC19F171EB00A0EE52 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; }; F03EF5EC19F171EB00A0EE52 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
@ -219,12 +219,12 @@
F021FBEC1A5EF57300EA3AE6 /* API */ = { F021FBEC1A5EF57300EA3AE6 /* API */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F02900B91A63C71E00356F7D /* ConsoleTools.h */,
F02900BA1A63C71E00356F7D /* ConsoleTools.m */,
F021FBED1A5EF57300EA3AE6 /* MediaLoader.h */, F021FBED1A5EF57300EA3AE6 /* MediaLoader.h */,
F021FBEE1A5EF57300EA3AE6 /* MediaLoader.m */, F021FBEE1A5EF57300EA3AE6 /* MediaLoader.m */,
F021FBF01A5F1F8E00EA3AE6 /* MediaManager.h */, F021FBF01A5F1F8E00EA3AE6 /* MediaManager.h */,
F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */, F021FBF11A5F1F8E00EA3AE6 /* MediaManager.m */,
F02900B91A63C71E00356F7D /* MXCTools.h */,
F02900BA1A63C71E00356F7D /* MXCTools.m */,
); );
path = API; path = API;
sourceTree = "<group>"; sourceTree = "<group>";
@ -253,14 +253,14 @@
F03EF5FC19F1762000A0EE52 /* View */ = { F03EF5FC19F1762000A0EE52 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F00B5DB71A1B9BCE00EA1C8D /* CustomImageView.h */, F00B5DB71A1B9BCE00EA1C8D /* MXCImageView.h */,
F00B5DB81A1B9BCE00EA1C8D /* CustomImageView.m */, F00B5DB81A1B9BCE00EA1C8D /* MXCImageView.m */,
71D2E4EA1A49814B000DE015 /* MemberActionsCell.h */,
71D2E4EB1A49814B000DE015 /* MemberActionsCell.m */,
71E94A751A5C4020009F52E5 /* PieChartView.h */, 71E94A751A5C4020009F52E5 /* PieChartView.h */,
71E94A761A5C4020009F52E5 /* PieChartView.m */, 71E94A761A5C4020009F52E5 /* PieChartView.m */,
F0E84D3E1A1F9AEC005F2E42 /* RecentsTableViewCell.h */, F0E84D3E1A1F9AEC005F2E42 /* RecentsTableViewCell.h */,
F0E84D3F1A1F9AEC005F2E42 /* RecentsTableViewCell.m */, F0E84D3F1A1F9AEC005F2E42 /* RecentsTableViewCell.m */,
71D2E4EA1A49814B000DE015 /* RoomMemberActionsCell.h */,
71D2E4EB1A49814B000DE015 /* RoomMemberActionsCell.m */,
F02D707419F1DC9E007B47D3 /* RoomMemberTableCell.h */, F02D707419F1DC9E007B47D3 /* RoomMemberTableCell.h */,
F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */, F02D707519F1DC9E007B47D3 /* RoomMemberTableCell.m */,
F03EF5FD19F1762000A0EE52 /* RoomMessageTableCell.h */, F03EF5FD19F1762000A0EE52 /* RoomMessageTableCell.h */,
@ -276,8 +276,8 @@
F0465AF71A251F85003639F9 /* Model */ = { F0465AF71A251F85003639F9 /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
710210A21A67A4B600364868 /* ConsoleGrowingTextView.h */, 710210A21A67A4B600364868 /* MXCGrowingTextView.h */,
710210A31A67A4B600364868 /* ConsoleGrowingTextView.m */, 710210A31A67A4B600364868 /* MXCGrowingTextView.m */,
F0D942F41A31F3A300826CC1 /* RecentRoom.h */, F0D942F41A31F3A300826CC1 /* RecentRoom.h */,
F0D942F51A31F3A300826CC1 /* RecentRoom.m */, F0D942F51A31F3A300826CC1 /* RecentRoom.m */,
F0465AF81A251F85003639F9 /* RoomMessage.h */, F0465AF81A251F85003639F9 /* RoomMessage.h */,
@ -321,8 +321,8 @@
F07A80DA19DD9DE700B621A1 /* AppDelegate.m */, F07A80DA19DD9DE700B621A1 /* AppDelegate.m */,
F0D3C30A1A011EF10000D49E /* AppSettings.h */, F0D3C30A1A011EF10000D49E /* AppSettings.h */,
F0D3C30B1A011EF10000D49E /* AppSettings.m */, F0D3C30B1A011EF10000D49E /* AppSettings.m */,
F03C470F1A02952800E445AB /* CustomAlert.h */, F03C470F1A02952800E445AB /* MXCAlert.h */,
F03C47101A02952800E445AB /* CustomAlert.m */, F03C47101A02952800E445AB /* MXCAlert.m */,
F05B955D19DEED8A008761B0 /* MatrixHandler.h */, F05B955D19DEED8A008761B0 /* MatrixHandler.h */,
F05B955E19DEED8A008761B0 /* MatrixHandler.m */, F05B955E19DEED8A008761B0 /* MatrixHandler.m */,
F07A80E219DD9DE700B621A1 /* Main.storyboard */, F07A80E219DD9DE700B621A1 /* Main.storyboard */,
@ -518,7 +518,7 @@
F05B955F19DEED8A008761B0 /* MatrixHandler.m in Sources */, F05B955F19DEED8A008761B0 /* MatrixHandler.m in Sources */,
F021FBEF1A5EF57300EA3AE6 /* MediaLoader.m in Sources */, F021FBEF1A5EF57300EA3AE6 /* MediaLoader.m in Sources */,
F03EF5FB19F171EB00A0EE52 /* SettingsViewController.m in Sources */, F03EF5FB19F171EB00A0EE52 /* SettingsViewController.m in Sources */,
F02900BB1A63C71E00356F7D /* ConsoleTools.m in Sources */, F02900BB1A63C71E00356F7D /* MXCTools.m in Sources */,
F01A0FF31A27314B009FAE2F /* RoomMessageComponent.m in Sources */, F01A0FF31A27314B009FAE2F /* RoomMessageComponent.m in Sources */,
F03EF5FA19F171EB00A0EE52 /* RoomViewController.m in Sources */, F03EF5FA19F171EB00A0EE52 /* RoomViewController.m in Sources */,
F03EF5F819F171EB00A0EE52 /* MasterTabBarController.m in Sources */, F03EF5F819F171EB00A0EE52 /* MasterTabBarController.m in Sources */,
@ -526,19 +526,19 @@
71DB9DC11A495B6400504A09 /* MemberViewController.m in Sources */, 71DB9DC11A495B6400504A09 /* MemberViewController.m in Sources */,
F0D942F61A31F3A300826CC1 /* RecentRoom.m in Sources */, F0D942F61A31F3A300826CC1 /* RecentRoom.m in Sources */,
F03EF5F919F171EB00A0EE52 /* RecentsViewController.m in Sources */, F03EF5F919F171EB00A0EE52 /* RecentsViewController.m in Sources */,
710210A41A67A4B600364868 /* ConsoleGrowingTextView.m in Sources */, 710210A41A67A4B600364868 /* MXCGrowingTextView.m in Sources */,
71E94A771A5C4020009F52E5 /* PieChartView.m in Sources */, 71E94A771A5C4020009F52E5 /* PieChartView.m in Sources */,
F0465AFA1A251F85003639F9 /* RoomMessage.m in Sources */, F0465AFA1A251F85003639F9 /* RoomMessage.m in Sources */,
F021FBF21A5F1F8E00EA3AE6 /* MediaManager.m in Sources */, F021FBF21A5F1F8E00EA3AE6 /* MediaManager.m in Sources */,
F04EE51F1A3A01D500C64930 /* APNSHandler.m in Sources */, F04EE51F1A3A01D500C64930 /* APNSHandler.m in Sources */,
F03C47111A02952800E445AB /* CustomAlert.m in Sources */, F03C47111A02952800E445AB /* MXCAlert.m in Sources */,
F0E84D401A1F9AEC005F2E42 /* RecentsTableViewCell.m in Sources */, F0E84D401A1F9AEC005F2E42 /* RecentsTableViewCell.m in Sources */,
F02D707619F1DC9E007B47D3 /* RoomMemberTableCell.m in Sources */, F02D707619F1DC9E007B47D3 /* RoomMemberTableCell.m in Sources */,
F00B5DB91A1B9BCE00EA1C8D /* CustomImageView.m in Sources */, F00B5DB91A1B9BCE00EA1C8D /* MXCImageView.m in Sources */,
F0D3C30C1A011EF10000D49E /* AppSettings.m in Sources */, F0D3C30C1A011EF10000D49E /* AppSettings.m in Sources */,
F03EF5F719F171EB00A0EE52 /* LoginViewController.m in Sources */, F03EF5F719F171EB00A0EE52 /* LoginViewController.m in Sources */,
F0D3C30F1A01330F0000D49E /* SettingsTableViewCell.m in Sources */, F0D3C30F1A01330F0000D49E /* SettingsTableViewCell.m in Sources */,
71D2E4EC1A49814B000DE015 /* MemberActionsCell.m in Sources */, 71D2E4EC1A49814B000DE015 /* RoomMemberActionsCell.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

View file

@ -16,7 +16,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface ConsoleTools : NSObject @interface MXCTools : NSObject
// Time interval // Time interval
+ (NSString*)formatSecondsInterval:(CGFloat)secondsInterval; + (NSString*)formatSecondsInterval:(CGFloat)secondsInterval;

View file

@ -14,11 +14,11 @@
limitations under the License. limitations under the License.
*/ */
#import "ConsoleTools.h" #import "MXCTools.h"
#import <MobileCoreServices/MobileCoreServices.h> #import <MobileCoreServices/MobileCoreServices.h>
@implementation ConsoleTools @implementation MXCTools
#pragma mark - Time interval #pragma mark - Time interval
@ -66,7 +66,7 @@
// is directory // is directory
if ([[fileAttributes objectForKey:NSFileType] isEqual:NSFileTypeDirectory]) if ([[fileAttributes objectForKey:NSFileType] isEqual:NSFileTypeDirectory])
{ {
[res addObjectsFromArray:[ConsoleTools listAttributesFiles:itemPath]]; [res addObjectsFromArray:[MXCTools listAttributesFiles:itemPath]];
} }
else else
{ {
@ -84,7 +84,7 @@
+ (long long)folderSize:(NSString *)folderPath + (long long)folderSize:(NSString *)folderPath
{ {
long long folderSize = 0; long long folderSize = 0;
NSArray *fileAtts = [ConsoleTools listAttributesFiles:folderPath]; NSArray *fileAtts = [MXCTools listAttributesFiles:folderPath];
for(NSDictionary *fileAtt in fileAtts) { for(NSDictionary *fileAtt in fileAtts) {
folderSize += [[fileAtt objectForKey:NSFileSize] intValue]; folderSize += [[fileAtt objectForKey:NSFileSize] intValue];
@ -98,7 +98,7 @@
// largeFilesFirst: move the largest file to the list head (large > 100KB). It can be combined isTimeSorted // largeFilesFirst: move the largest file to the list head (large > 100KB). It can be combined isTimeSorted
+ (NSArray*)listFiles:(NSString *)folderPath timeSorted:(BOOL)isTimeSorted largeFilesFirst:(BOOL)largeFilesFirst { + (NSArray*)listFiles:(NSString *)folderPath timeSorted:(BOOL)isTimeSorted largeFilesFirst:(BOOL)largeFilesFirst {
NSArray* attFilesList = [ConsoleTools listAttributesFiles:folderPath]; NSArray* attFilesList = [MXCTools listAttributesFiles:folderPath];
if (attFilesList.count > 0) { if (attFilesList.count > 0) {

View file

@ -16,7 +16,7 @@
#import "MediaManager.h" #import "MediaManager.h"
#import "MatrixHandler.h" #import "MatrixHandler.h"
#import "ConsoleTools.h" #import "MXCTools.h"
NSString *const kMediaDownloadProgressNotification = @"kMediaDownloadProgressNotification"; NSString *const kMediaDownloadProgressNotification = @"kMediaDownloadProgressNotification";
NSString *const kMediaUploadProgressNotification = @"kMediaUploadProgressNotification"; NSString *const kMediaUploadProgressNotification = @"kMediaUploadProgressNotification";
@ -140,7 +140,7 @@ NSString *const kMediaLoaderProgressDownloadRateKey = @"kMediaLoaderProgressDown
NSString* progressString = [NSString stringWithFormat:@"%@ / %@", [NSByteCountFormatter stringFromByteCount:downloadData.length countStyle:NSByteCountFormatterCountStyleFile], [NSByteCountFormatter stringFromByteCount:expectedSize countStyle:NSByteCountFormatterCountStyleFile]]; NSString* progressString = [NSString stringWithFormat:@"%@ / %@", [NSByteCountFormatter stringFromByteCount:downloadData.length countStyle:NSByteCountFormatterCountStyleFile], [NSByteCountFormatter stringFromByteCount:expectedSize countStyle:NSByteCountFormatterCountStyleFile]];
[dict setValue:progressString forKey:kMediaLoaderProgressStringKey]; [dict setValue:progressString forKey:kMediaLoaderProgressStringKey];
[dict setValue:[ConsoleTools formatSecondsInterval:dataRemainingTime] forKey:kMediaLoaderProgressRemaingTimeKey]; [dict setValue:[MXCTools formatSecondsInterval:dataRemainingTime] forKey:kMediaLoaderProgressRemaingTimeKey];
NSString* downloadRateStr = [NSString stringWithFormat:@"%@/s", [NSByteCountFormatter stringFromByteCount:meanRate * 1024 countStyle:NSByteCountFormatterCountStyleFile]]; NSString* downloadRateStr = [NSString stringWithFormat:@"%@/s", [NSByteCountFormatter stringFromByteCount:meanRate * 1024 countStyle:NSByteCountFormatterCountStyleFile]];
[dict setValue:downloadRateStr forKey:kMediaLoaderProgressDownloadRateKey]; [dict setValue:downloadRateStr forKey:kMediaLoaderProgressDownloadRateKey];
@ -242,7 +242,7 @@ NSString *const kMediaLoaderProgressDownloadRateKey = @"kMediaLoaderProgressDown
NSString* progressString = [NSString stringWithFormat:@"%@ / %@", [NSByteCountFormatter stringFromByteCount:totalBytesWritten countStyle:NSByteCountFormatterCountStyleFile], [NSByteCountFormatter stringFromByteCount:totalBytesExpectedToWrite countStyle:NSByteCountFormatterCountStyleFile]]; NSString* progressString = [NSString stringWithFormat:@"%@ / %@", [NSByteCountFormatter stringFromByteCount:totalBytesWritten countStyle:NSByteCountFormatterCountStyleFile], [NSByteCountFormatter stringFromByteCount:totalBytesExpectedToWrite countStyle:NSByteCountFormatterCountStyleFile]];
[statisticsDict setValue:progressString forKey:kMediaLoaderProgressStringKey]; [statisticsDict setValue:progressString forKey:kMediaLoaderProgressStringKey];
[statisticsDict setValue:[ConsoleTools formatSecondsInterval:dataRemainingTime] forKey:kMediaLoaderProgressRemaingTimeKey]; [statisticsDict setValue:[MXCTools formatSecondsInterval:dataRemainingTime] forKey:kMediaLoaderProgressRemaingTimeKey];
NSString* downloadRateStr = [NSString stringWithFormat:@"%@/s", [NSByteCountFormatter stringFromByteCount:dataRate * 1024 countStyle:NSByteCountFormatterCountStyleFile]]; NSString* downloadRateStr = [NSString stringWithFormat:@"%@/s", [NSByteCountFormatter stringFromByteCount:dataRate * 1024 countStyle:NSByteCountFormatterCountStyleFile]];
[statisticsDict setValue:downloadRateStr forKey:kMediaLoaderProgressDownloadRateKey]; [statisticsDict setValue:downloadRateStr forKey:kMediaLoaderProgressDownloadRateKey];

View file

@ -17,7 +17,7 @@
#import "MediaManager.h" #import "MediaManager.h"
#import "AppSettings.h" #import "AppSettings.h"
#import "ConsoleTools.h" #import "MXCTools.h"
#import "AppDelegate.h" #import "AppDelegate.h"
@ -250,7 +250,7 @@ static NSMutableDictionary* uploadTableById = nil;
maxSize = [MediaManager maxAllowedCacheSize] - bytes - 50 * 1024 * 1024; maxSize = [MediaManager maxAllowedCacheSize] - bytes - 50 * 1024 * 1024;
} }
NSArray* filesList = [ConsoleTools listFiles:mediaCachePath timeSorted:YES largeFilesFirst:YES]; NSArray* filesList = [MXCTools listFiles:mediaCachePath timeSorted:YES largeFilesFirst:YES];
// list the files sorted by timestamp // list the files sorted by timestamp
for(NSString* filepath in filesList) { for(NSString* filepath in filesList) {
@ -305,7 +305,7 @@ static NSMutableDictionary* uploadTableById = nil;
} }
+ (NSString*)cachePathForMediaURL:(NSString*)mediaURL andType:(NSString *)mimeType inFolder:(NSString*)folder { + (NSString*)cachePathForMediaURL:(NSString*)mediaURL andType:(NSString *)mimeType inFolder:(NSString*)folder {
NSString* fileExt = [ConsoleTools fileExtensionFromContentType:mimeType]; NSString* fileExt = [MXCTools fileExtensionFromContentType:mimeType];
NSString* fileBase = @""; NSString* fileBase = @"";
// use the mime type to extract a base filename // use the mime type to extract a base filename
@ -326,7 +326,7 @@ static NSMutableDictionary* uploadTableById = nil;
// assume that 0 means uninitialized // assume that 0 means uninitialized
if (storageCacheSize == 0) { if (storageCacheSize == 0) {
storageCacheSize = (NSUInteger)[ConsoleTools folderSize:mediaCachePath]; storageCacheSize = (NSUInteger)[MXCTools folderSize:mediaCachePath];
} }
return storageCacheSize; return storageCacheSize;
@ -334,7 +334,7 @@ static NSMutableDictionary* uploadTableById = nil;
+ (NSUInteger)minCacheSize { + (NSUInteger)minCacheSize {
NSUInteger minSize = [MediaManager cacheSize]; NSUInteger minSize = [MediaManager cacheSize];
NSArray* filenamesList = [ConsoleTools listFiles:mediaCachePath timeSorted:NO largeFilesFirst:YES]; NSArray* filenamesList = [MXCTools listFiles:mediaCachePath timeSorted:NO largeFilesFirst:YES];
NSFileManager* defaultManager = [NSFileManager defaultManager]; NSFileManager* defaultManager = [NSFileManager defaultManager];

View file

@ -17,7 +17,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "MasterTabBarController.h" #import "MasterTabBarController.h"
#import "CustomAlert.h" #import "MXCAlert.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate> { @interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate> {
BOOL isAPNSRegistered; BOOL isAPNSRegistered;
@ -26,7 +26,7 @@
@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) MasterTabBarController *masterTabBarController; @property (strong, nonatomic) MasterTabBarController *masterTabBarController;
@property (strong, nonatomic) CustomAlert *errorNotification; @property (strong, nonatomic) MXCAlert *errorNotification;
+ (AppDelegate*)theDelegate; + (AppDelegate*)theDelegate;
@ -34,7 +34,7 @@
- (void)logout; - (void)logout;
- (CustomAlert*)showErrorAsAlert:(NSError*)error; - (MXCAlert*)showErrorAsAlert:(NSError*)error;
@end @end

View file

@ -187,7 +187,7 @@
[self.masterTabBarController setSelectedIndex:TABBAR_HOME_INDEX]; [self.masterTabBarController setSelectedIndex:TABBAR_HOME_INDEX];
} }
- (CustomAlert*)showErrorAsAlert:(NSError*)error { - (MXCAlert*)showErrorAsAlert:(NSError*)error {
if (self.errorNotification) { if (self.errorNotification) {
[self.errorNotification dismiss:NO]; [self.errorNotification dismiss:NO];
} }
@ -199,8 +199,8 @@
} }
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey]; NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
self.errorNotification = [[CustomAlert alloc] initWithTitle:title message:msg style:CustomAlertStyleAlert]; self.errorNotification = [[MXCAlert alloc] initWithTitle:title message:msg style:MXCAlertStyleAlert];
self.errorNotification.cancelButtonIndex = [self.errorNotification addActionWithTitle:@"OK" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.errorNotification.cancelButtonIndex = [self.errorNotification addActionWithTitle:@"OK" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[AppDelegate theDelegate].errorNotification = nil; [AppDelegate theDelegate].errorNotification = nil;
}]; }];
[self.errorNotification showInViewController:[self.masterTabBarController selectedViewController]]; [self.errorNotification showInViewController:[self.masterTabBarController selectedViewController]];

View file

@ -46,7 +46,7 @@
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lq0-jR-3i5" id="iJp-sA-hG6"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lq0-jR-3i5" id="iJp-sA-hG6">
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="uhu-R0-9NH" customClass="CustomImageView"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="uhu-R0-9NH" customClass="MXCImageView">
<rect key="frame" x="8" y="5" width="40" height="40"/> <rect key="frame" x="8" y="5" width="40" height="40"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="40" id="ZJO-eO-xOQ"/> <constraint firstAttribute="width" constant="40" id="ZJO-eO-xOQ"/>
@ -67,7 +67,7 @@
<constraint firstAttribute="width" constant="20" id="paH-au-BZZ"/> <constraint firstAttribute="width" constant="20" id="paH-au-BZZ"/>
</constraints> </constraints>
</imageView> </imageView>
<imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mvK-ez-meg" userLabel="Attachment View" customClass="CustomImageView"> <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mvK-ez-meg" userLabel="Attachment View" customClass="MXCImageView">
<rect key="frame" x="51" y="18" width="192" height="32"/> <rect key="frame" x="51" y="18" width="192" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="192" id="Ui5-gH-5Oe"/> <constraint firstAttribute="width" constant="192" id="Ui5-gH-5Oe"/>
@ -194,7 +194,7 @@
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<dataDetectorType key="dataDetectorTypes" link="YES"/> <dataDetectorType key="dataDetectorTypes" link="YES"/>
</textView> </textView>
<imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="QZT-V8-yqJ" userLabel="Attachment View" customClass="CustomImageView"> <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="QZT-V8-yqJ" userLabel="Attachment View" customClass="MXCImageView">
<rect key="frame" x="357" y="18" width="192" height="32"/> <rect key="frame" x="357" y="18" width="192" height="32"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="192" id="GvD-tV-Uc3"/> <constraint firstAttribute="width" constant="192" id="GvD-tV-Uc3"/>
@ -239,7 +239,7 @@
<constraint firstAttribute="centerX" secondItem="lTG-14-OWN" secondAttribute="centerX" id="weT-lI-eKE"/> <constraint firstAttribute="centerX" secondItem="lTG-14-OWN" secondAttribute="centerX" id="weT-lI-eKE"/>
</constraints> </constraints>
</view> </view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="mks-jh-AiZ" customClass="CustomImageView"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="mks-jh-AiZ" customClass="MXCImageView">
<rect key="frame" x="552" y="5" width="40" height="40"/> <rect key="frame" x="552" y="5" width="40" height="40"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="sGR-sG-6fA"/> <constraint firstAttribute="height" constant="40" id="sGR-sG-6fA"/>
@ -325,7 +325,7 @@
<action selector="onButtonPressed:" destination="msb-ol-2LB" eventType="touchUpInside" id="YtT-Cb-ZPk"/> <action selector="onButtonPressed:" destination="msb-ol-2LB" eventType="touchUpInside" id="YtT-Cb-ZPk"/>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UVo-EY-Nyg" customClass="ConsoleGrowingTextView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UVo-EY-Nyg" customClass="MXCGrowingTextView">
<rect key="frame" x="38" y="8" width="510" height="28"/> <rect key="frame" x="38" y="8" width="510" height="28"/>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Icg-kc-a2c"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Icg-kc-a2c">
@ -374,7 +374,7 @@
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kac-Vi-XbY" id="prD-ap-cDD"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kac-Vi-XbY" id="prD-ap-cDD">
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="RW8-nh-DTj" customClass="CustomImageView"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default-profile.png" translatesAutoresizingMaskIntoConstraints="NO" id="RW8-nh-DTj" customClass="MXCImageView">
<rect key="frame" x="8" y="5" width="40" height="40"/> <rect key="frame" x="8" y="5" width="40" height="40"/>
<constraints> <constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="4c3-8w-4Tg"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="4c3-8w-4Tg"/>
@ -575,7 +575,7 @@
</constraints> </constraints>
</view> </view>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" restorationIdentifier="MemberActionsCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="MemberActionsCell" id="zRe-DS-U67" customClass="MemberActionsCell"> <tableViewCell contentMode="scaleToFill" restorationIdentifier="MemberActionsCell" selectionStyle="default" indentationWidth="10" reuseIdentifier="MemberActionsCell" id="zRe-DS-U67" customClass="RoomMemberActionsCell">
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zRe-DS-U67" id="C5i-Xc-2Zi"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zRe-DS-U67" id="C5i-Xc-2Zi">
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>

View file

@ -20,30 +20,30 @@
// with a preferredStyle of UIAlertControllerStyleAlert. // with a preferredStyle of UIAlertControllerStyleAlert.
typedef enum : NSUInteger { typedef enum : NSUInteger {
CustomAlertActionStyleDefault = 0, MXCAlertActionStyleDefault = 0,
CustomAlertActionStyleCancel, MXCAlertActionStyleCancel,
CustomAlertActionStyleDestructive MXCAlertActionStyleDestructive
} CustomAlertActionStyle; } MXCAlertActionStyle;
typedef enum : NSUInteger { typedef enum : NSUInteger {
CustomAlertStyleActionSheet = 0, MXCAlertStyleActionSheet = 0,
CustomAlertStyleAlert MXCAlertStyleAlert
} CustomAlertStyle; } MXCAlertStyle;
@interface CustomAlert : NSObject <UIActionSheetDelegate> { @interface MXCAlert : NSObject <UIActionSheetDelegate> {
} }
typedef void (^blockCustomAlert_onClick)(CustomAlert *alert); typedef void (^blockMXCAlert_onClick)(MXCAlert *alert);
typedef void (^blockCustomAlert_textFieldHandler)(UITextField *textField); typedef void (^blockMXCAlert_textFieldHandler)(UITextField *textField);
@property(nonatomic) NSInteger cancelButtonIndex; // required to dismiss cusmtomAlert on iOS < 8 (default is -1). @property(nonatomic) NSInteger cancelButtonIndex; // required to dismiss cusmtomAlert on iOS < 8 (default is -1).
@property(nonatomic, weak) UIView *sourceView; @property(nonatomic, weak) UIView *sourceView;
- (id)initWithTitle:(NSString *)title message:(NSString *)message style:(CustomAlertStyle)style; - (id)initWithTitle:(NSString *)title message:(NSString *)message style:(MXCAlertStyle)style;
// adds a button with the title. returns the index (0 based) of where it was added. // adds a button with the title. returns the index (0 based) of where it was added.
- (NSInteger)addActionWithTitle:(NSString *)title style:(CustomAlertActionStyle)style handler:(blockCustomAlert_onClick)handler; - (NSInteger)addActionWithTitle:(NSString *)title style:(MXCAlertActionStyle)style handler:(blockMXCAlert_onClick)handler;
// Adds a text field to an alert (Note: You can add a text field only if the style property is set to CustomAlertStyleAlert). // Adds a text field to an alert (Note: You can add a text field only if the style property is set to MXCAlertStyleAlert).
- (void)addTextFieldWithConfigurationHandler:(blockCustomAlert_textFieldHandler)configurationHandler; - (void)addTextFieldWithConfigurationHandler:(blockMXCAlert_textFieldHandler)configurationHandler;
- (void)showInViewController:(UIViewController*)viewController; - (void)showInViewController:(UIViewController*)viewController;

View file

@ -15,11 +15,11 @@
limitations under the License. limitations under the License.
*/ */
#import "CustomAlert.h" #import "MXCAlert.h"
#import <objc/runtime.h> #import <objc/runtime.h>
@interface CustomAlert() @interface MXCAlert()
{ {
UIViewController* parentViewController; UIViewController* parentViewController;
NSMutableArray *actions; // use only for iOS < 8 NSMutableArray *actions; // use only for iOS < 8
@ -28,7 +28,7 @@
@property(nonatomic, strong) id alert; // alert is kind of UIAlertController for IOS 8 and later, in other cases it's kind of UIAlertView or UIActionSheet. @property(nonatomic, strong) id alert; // alert is kind of UIAlertController for IOS 8 and later, in other cases it's kind of UIAlertView or UIActionSheet.
@end @end
@implementation CustomAlert @implementation MXCAlert
- (void)dealloc { - (void)dealloc {
// iOS < 8 // iOS < 8
@ -42,14 +42,14 @@
actions = nil; actions = nil;
} }
- (id)initWithTitle:(NSString *)title message:(NSString *)message style:(CustomAlertStyle)style { - (id)initWithTitle:(NSString *)title message:(NSString *)message style:(MXCAlertStyle)style {
if (self = [super init]) { if (self = [super init]) {
// Check iOS version // Check iOS version
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) { if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) {
_alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:(UIAlertControllerStyle)style]; _alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:(UIAlertControllerStyle)style];
} else { } else {
// Use legacy objects // Use legacy objects
if (style == CustomAlertStyleActionSheet) { if (style == MXCAlertStyleActionSheet) {
_alert = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; _alert = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
} else { } else {
_alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:nil otherButtonTitles:nil]; _alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
@ -62,7 +62,7 @@
} }
- (NSInteger)addActionWithTitle:(NSString *)title style:(CustomAlertActionStyle)style handler:(blockCustomAlert_onClick)handler { - (NSInteger)addActionWithTitle:(NSString *)title style:(MXCAlertActionStyle)style handler:(blockMXCAlert_onClick)handler {
NSInteger index = 0; NSInteger index = 0;
if ([_alert isKindOfClass:[UIAlertController class]]) { if ([_alert isKindOfClass:[UIAlertController class]]) {
index = [(UIAlertController *)_alert actions].count; index = [(UIAlertController *)_alert actions].count;
@ -99,7 +99,7 @@
return index; return index;
} }
- (void)addTextFieldWithConfigurationHandler:(blockCustomAlert_textFieldHandler)configurationHandler { - (void)addTextFieldWithConfigurationHandler:(blockMXCAlert_textFieldHandler)configurationHandler {
if ([_alert isKindOfClass:[UIAlertController class]]) { if ([_alert isKindOfClass:[UIAlertController class]]) {
[(UIAlertController *)_alert addTextFieldWithConfigurationHandler:configurationHandler]; [(UIAlertController *)_alert addTextFieldWithConfigurationHandler:configurationHandler];
} else if ([_alert isKindOfClass:[UIAlertView class]]) { } else if ([_alert isKindOfClass:[UIAlertView class]]) {
@ -146,13 +146,13 @@
if (alertView.alertViewStyle != UIAlertViewStyleDefault) { if (alertView.alertViewStyle != UIAlertViewStyleDefault) {
// Call here textField handlers // Call here textField handlers
UITextField *textField = [alertView textFieldAtIndex:0]; UITextField *textField = [alertView textFieldAtIndex:0];
blockCustomAlert_textFieldHandler configurationHandler = objc_getAssociatedObject(textField, "configurationHandler"); blockMXCAlert_textFieldHandler configurationHandler = objc_getAssociatedObject(textField, "configurationHandler");
if (configurationHandler) { if (configurationHandler) {
configurationHandler (textField); configurationHandler (textField);
} }
if (alertView.alertViewStyle == UIAlertViewStyleLoginAndPasswordInput) { if (alertView.alertViewStyle == UIAlertViewStyleLoginAndPasswordInput) {
textField = [alertView textFieldAtIndex:1]; textField = [alertView textFieldAtIndex:1];
blockCustomAlert_textFieldHandler configurationHandler = objc_getAssociatedObject(textField, "configurationHandler"); blockMXCAlert_textFieldHandler configurationHandler = objc_getAssociatedObject(textField, "configurationHandler");
if (configurationHandler) { if (configurationHandler) {
configurationHandler (textField); configurationHandler (textField);
} }
@ -192,7 +192,7 @@
// the user could have forgotten to set the cancel button index // the user could have forgotten to set the cancel button index
if (buttonIndex < actions.count) { if (buttonIndex < actions.count) {
// Retrieve the callback // Retrieve the callback
blockCustomAlert_onClick block = [actions objectAtIndex:buttonIndex]; blockMXCAlert_onClick block = [actions objectAtIndex:buttonIndex];
if ([block isEqual:[NSNull null]] == NO) { if ([block isEqual:[NSNull null]] == NO) {
// And call it // And call it
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
@ -215,7 +215,7 @@
// the user could have forgotten to set the cancel button index // the user could have forgotten to set the cancel button index
if (buttonIndex < actions.count) { if (buttonIndex < actions.count) {
// Retrieve the callback // Retrieve the callback
blockCustomAlert_onClick block = [actions objectAtIndex:buttonIndex]; blockMXCAlert_onClick block = [actions objectAtIndex:buttonIndex];
if ([block isEqual:[NSNull null]] == NO) { if ([block isEqual:[NSNull null]] == NO) {
// And call it // And call it
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{

View file

@ -17,7 +17,7 @@
#import "MatrixHandler.h" #import "MatrixHandler.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "AppSettings.h" #import "AppSettings.h"
#import "CustomAlert.h" #import "MXCAlert.h"
#import "MXFileStore.h" #import "MXFileStore.h"
#import "MXTools.h" #import "MXTools.h"
@ -41,7 +41,7 @@ static MatrixHandler *sharedHandler = nil;
@property (strong, nonatomic) MXFileStore *mxFileStore; @property (strong, nonatomic) MXFileStore *mxFileStore;
@property (nonatomic,readwrite) MatrixHandlerStatus status; @property (nonatomic,readwrite) MatrixHandlerStatus status;
@property (nonatomic,readwrite) BOOL isResumeDone; @property (nonatomic,readwrite) BOOL isResumeDone;
@property (strong, nonatomic) CustomAlert *mxNotification; @property (strong, nonatomic) MXCAlert *mxNotification;
@property (nonatomic) UIBackgroundTaskIdentifier bgTask; @property (nonatomic) UIBackgroundTaskIdentifier bgTask;
@end @end
@ -328,17 +328,17 @@ static MatrixHandler *sharedHandler = nil;
[self.mxNotification dismiss:NO]; [self.mxNotification dismiss:NO];
} }
self.mxNotification = [[CustomAlert alloc] initWithTitle:roomState.displayname self.mxNotification = [[MXCAlert alloc] initWithTitle:roomState.displayname
message:messageText message:messageText
style:CustomAlertStyleAlert]; style:MXCAlertStyleAlert];
self.mxNotification.cancelButtonIndex = [self.mxNotification addActionWithTitle:@"OK" self.mxNotification.cancelButtonIndex = [self.mxNotification addActionWithTitle:@"OK"
style:CustomAlertActionStyleDefault style:MXCAlertActionStyleDefault
handler:^(CustomAlert *alert) { handler:^(MXCAlert *alert) {
[MatrixHandler sharedHandler].mxNotification = nil; [MatrixHandler sharedHandler].mxNotification = nil;
}]; }];
[self.mxNotification addActionWithTitle:@"View" [self.mxNotification addActionWithTitle:@"View"
style:CustomAlertActionStyleDefault style:MXCAlertActionStyleDefault
handler:^(CustomAlert *alert) { handler:^(MXCAlert *alert) {
[MatrixHandler sharedHandler].mxNotification = nil; [MatrixHandler sharedHandler].mxNotification = nil;
// Show the room // Show the room
[[AppDelegate theDelegate].masterTabBarController showRoom:event.roomId]; [[AppDelegate theDelegate].masterTabBarController showRoom:event.roomId];

View file

@ -17,5 +17,5 @@
#import "HPGrowingTextView.h" #import "HPGrowingTextView.h"
@interface ConsoleGrowingTextView : HPGrowingTextView @interface MXCGrowingTextView : HPGrowingTextView
@end @end

View file

@ -14,9 +14,9 @@
limitations under the License. limitations under the License.
*/ */
#import "ConsoleGrowingTextView.h" #import "MXCGrowingTextView.h"
@implementation ConsoleGrowingTextView @implementation MXCGrowingTextView
// override theses two methods to fix a weird IOS 8 issue // override theses two methods to fix a weird IOS 8 issue
// it seems that the textview must be a little smaller than its superview // it seems that the textview must be a little smaller than its superview
@ -25,8 +25,7 @@
// 2 - with the right content : resetScrollPositionForIOS7 fix the content Offset // 2 - with the right content : resetScrollPositionForIOS7 fix the content Offset
// so center the textView in its superView // so center the textView in its superView
-(void)resizeTextView:(NSInteger)newSizeH -(void)resizeTextView:(NSInteger)newSizeH {
{
if ([delegate respondsToSelector:@selector(growingTextView:willChangeHeight:)]) { if ([delegate respondsToSelector:@selector(growingTextView:willChangeHeight:)]) {
[delegate growingTextView:self willChangeHeight:newSizeH + self.layer.cornerRadius]; [delegate growingTextView:self willChangeHeight:newSizeH + self.layer.cornerRadius];
} }
@ -45,8 +44,7 @@
} }
} }
-(void)layoutSubviews -(void)layoutSubviews {
{
[super layoutSubviews]; [super layoutSubviews];
CGRect r = self.bounds; CGRect r = self.bounds;

View file

@ -17,9 +17,9 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
// Customize UIView in order to display image defined with remote url. Zooming inside the image (Stretching) is supported. // Customize UIView in order to display image defined with remote url. Zooming inside the image (Stretching) is supported.
@interface CustomImageView : UIView <UIScrollViewDelegate> @interface MXCImageView : UIView <UIScrollViewDelegate>
typedef void (^blockCustomImageView_onClick)(CustomImageView *imageView, NSString* title); typedef void (^blockMXCImageView_onClick)(MXCImageView *imageView, NSString* title);
- (void)setImageURL:(NSString *)imageURL withPreviewImage:(UIImage*)previewImage; - (void)setImageURL:(NSString *)imageURL withPreviewImage:(UIImage*)previewImage;
@ -38,8 +38,8 @@ typedef void (^blockCustomImageView_onClick)(CustomImageView *imageView, NSStrin
@property (nonatomic, readwrite) NSString* mediaFolder; @property (nonatomic, readwrite) NSString* mediaFolder;
// Let the user defines some custom buttons over the tabbar // Let the user defines some custom buttons over the tabbar
- (void)setLeftButtonTitle :leftButtonTitle handler:(blockCustomImageView_onClick)handler; - (void)setLeftButtonTitle :leftButtonTitle handler:(blockMXCImageView_onClick)handler;
- (void)setRightButtonTitle:rightButtonTitle handler:(blockCustomImageView_onClick)handler; - (void)setRightButtonTitle:rightButtonTitle handler:(blockMXCImageView_onClick)handler;
- (void)dismissSelection; - (void)dismissSelection;

View file

@ -14,12 +14,12 @@
limitations under the License. limitations under the License.
*/ */
#import "CustomImageView.h" #import "MXCImageView.h"
#import "MediaManager.h" #import "MediaManager.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "PieChartView.h" #import "PieChartView.h"
@interface CustomImageView () { @interface MXCImageView () {
NSString *imageURL; NSString *imageURL;
UIImage *currentImage; UIImage *currentImage;
@ -37,8 +37,8 @@
NSString *leftButtonTitle; NSString *leftButtonTitle;
NSString *rightButtonTitle; NSString *rightButtonTitle;
blockCustomImageView_onClick leftHandler; blockMXCImageView_onClick leftHandler;
blockCustomImageView_onClick rightHandler; blockMXCImageView_onClick rightHandler;
UIView* bottomBarView; UIView* bottomBarView;
@ -50,7 +50,7 @@
} }
@end @end
@implementation CustomImageView @implementation MXCImageView
@synthesize stretchable, mediaFolder; @synthesize stretchable, mediaFolder;
#define CUSTOM_IMAGE_VIEW_BUTTON_WIDTH 100 #define CUSTOM_IMAGE_VIEW_BUTTON_WIDTH 100
@ -533,12 +533,12 @@
#pragma mark - buttons management #pragma mark - buttons management
- (void)setLeftButtonTitle: aLeftButtonTitle handler:(blockCustomImageView_onClick)handler { - (void)setLeftButtonTitle: aLeftButtonTitle handler:(blockMXCImageView_onClick)handler {
leftButtonTitle = aLeftButtonTitle; leftButtonTitle = aLeftButtonTitle;
leftHandler = handler; leftHandler = handler;
} }
- (void)setRightButtonTitle:aRightButtonTitle handler:(blockCustomImageView_onClick)handler { - (void)setRightButtonTitle:aRightButtonTitle handler:(blockMXCImageView_onClick)handler {
rightButtonTitle = aRightButtonTitle; rightButtonTitle = aRightButtonTitle;
rightHandler = handler; rightHandler = handler;
} }

View file

@ -16,7 +16,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface MemberActionsCell : UITableViewCell @interface RoomMemberActionsCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *rightButton; @property (weak, nonatomic) IBOutlet UIButton *rightButton;
@property (weak, nonatomic) IBOutlet UIButton *leftButton; @property (weak, nonatomic) IBOutlet UIButton *leftButton;

View file

@ -14,9 +14,9 @@
limitations under the License. limitations under the License.
*/ */
#import "MemberActionsCell.h" #import "RoomMemberActionsCell.h"
@implementation MemberActionsCell @implementation RoomMemberActionsCell
- (void)initButton:(UIButton*)button withText:(NSString*)text { - (void)initButton:(UIButton*)button withText:(NSString*)text {

View file

@ -15,7 +15,7 @@
*/ */
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "CustomImageView.h" #import "MXCImageView.h"
#import "PieChartView.h" #import "PieChartView.h"
@class MXRoomMember; @class MXRoomMember;
@ -25,7 +25,7 @@
@interface RoomMemberTableCell : UITableViewCell { @interface RoomMemberTableCell : UITableViewCell {
PieChartView* pieChartView; PieChartView* pieChartView;
} }
@property (strong, nonatomic) IBOutlet CustomImageView *pictureView; @property (strong, nonatomic) IBOutlet MXCImageView *pictureView;
@property (weak, nonatomic) IBOutlet UILabel *userLabel; @property (weak, nonatomic) IBOutlet UILabel *userLabel;
@property (weak, nonatomic) IBOutlet UIView *powerContainer; @property (weak, nonatomic) IBOutlet UIView *powerContainer;
@property (weak, nonatomic) IBOutlet UIImageView *typingBadge; @property (weak, nonatomic) IBOutlet UIImageView *typingBadge;

View file

@ -15,15 +15,15 @@
*/ */
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "CustomImageView.h" #import "MXCImageView.h"
#import "RoomMessage.h" #import "RoomMessage.h"
#import "PieChartView.h" #import "PieChartView.h"
// Room Message Table View Cell // Room Message Table View Cell
@interface RoomMessageTableCell : UITableViewCell @interface RoomMessageTableCell : UITableViewCell
@property (strong, nonatomic) IBOutlet CustomImageView *pictureView; @property (strong, nonatomic) IBOutlet MXCImageView *pictureView;
@property (weak, nonatomic) IBOutlet UITextView *messageTextView; @property (weak, nonatomic) IBOutlet UITextView *messageTextView;
@property (strong, nonatomic) IBOutlet CustomImageView *attachmentView; @property (strong, nonatomic) IBOutlet MXCImageView *attachmentView;
@property (strong, nonatomic) IBOutlet UIImageView *playIconView; @property (strong, nonatomic) IBOutlet UIImageView *playIconView;
@property (weak, nonatomic) IBOutlet UIView *dateTimeLabelContainer; @property (weak, nonatomic) IBOutlet UIView *dateTimeLabelContainer;

View file

@ -18,12 +18,12 @@
#import "MatrixHandler.h" #import "MatrixHandler.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "CustomAlert.h" #import "MXCAlert.h"
@interface LoginViewController () @interface LoginViewController ()
{ {
// reference to any opened alert view // reference to any opened alert view
CustomAlert *alert; MXCAlert *alert;
} }
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentViewBottomConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentViewBottomConstraint;
@ -255,8 +255,8 @@
} }
//Alert user //Alert user
alert = [[CustomAlert alloc] initWithTitle:@"Login Failed" message:message style:CustomAlertStyleAlert]; alert = [[MXCAlert alloc] initWithTitle:@"Login Failed" message:message style:MXCAlertStyleAlert];
[alert addActionWithTitle:@"Dismiss" style:CustomAlertActionStyleCancel handler:^(CustomAlert *alert) {}]; [alert addActionWithTitle:@"Dismiss" style:MXCAlertActionStyleCancel handler:^(MXCAlert *alert) {}];
[alert showInViewController:self]; [alert showInViewController:self];
}]; }];
} }

View file

@ -17,7 +17,7 @@
#import "MemberViewController.h" #import "MemberViewController.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "MemberActionsCell.h" #import "RoomMemberActionsCell.h"
#import "MediaManager.h" #import "MediaManager.h"
@interface MemberViewController () { @interface MemberViewController () {
@ -37,7 +37,7 @@
@property (weak, nonatomic) IBOutlet UIButton *memberThumbnailButton; @property (weak, nonatomic) IBOutlet UIButton *memberThumbnailButton;
@property (weak, nonatomic) IBOutlet UITextView *roomMemberMID; @property (weak, nonatomic) IBOutlet UITextView *roomMemberMID;
@property (strong, nonatomic) CustomAlert *actionMenu; @property (strong, nonatomic) MXCAlert *actionMenu;
- (IBAction)onButtonToggle:(id)sender; - (IBAction)onButtonToggle:(id)sender;
@ -314,7 +314,7 @@
if (self.tableView == aTableView) { if (self.tableView == aTableView) {
NSInteger row = indexPath.row; NSInteger row = indexPath.row;
MemberActionsCell* memberActionsCell = (MemberActionsCell*)[aTableView dequeueReusableCellWithIdentifier:@"MemberActionsCell" forIndexPath:indexPath]; RoomMemberActionsCell* memberActionsCell = (RoomMemberActionsCell*)[aTableView dequeueReusableCellWithIdentifier:@"MemberActionsCell" forIndexPath:indexPath];
NSString* leftTitle = nil; NSString* leftTitle = nil;
NSString* rightTitle = nil; NSString* rightTitle = nil;
@ -393,10 +393,10 @@
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
// Ask for userId to invite // Ask for userId to invite
self.actionMenu = [[CustomAlert alloc] initWithTitle:@"Power Level" message:nil style:CustomAlertStyleAlert]; self.actionMenu = [[MXCAlert alloc] initWithTitle:@"Power Level" message:nil style:MXCAlertStyleAlert];
if (![mxHandler.userId isEqualToString:roomMember.userId]) { if (![mxHandler.userId isEqualToString:roomMember.userId]) {
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Reset to default" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Reset to default" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
[weakSelf setUserPowerLevel:roomMember to:0]; [weakSelf setUserPowerLevel:roomMember to:0];
@ -408,7 +408,7 @@
textField.placeholder = nil; textField.placeholder = nil;
textField.keyboardType = UIKeyboardTypeDecimalPad; textField.keyboardType = UIKeyboardTypeDecimalPad;
}]; }];
[self.actionMenu addActionWithTitle:@"OK" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [self.actionMenu addActionWithTitle:@"OK" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
UITextField *textField = [alert textFieldAtIndex:0]; UITextField *textField = [alert textFieldAtIndex:0];
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;

View file

@ -29,9 +29,9 @@
#import "AppSettings.h" #import "AppSettings.h"
#import "MediaManager.h" #import "MediaManager.h"
#import "ConsoleTools.h" #import "MXCTools.h"
#import "ConsoleGrowingTextView.h" #import "MXCGrowingTextView.h"
#define ROOMVIEWCONTROLLER_TYPING_TIMEOUT_SEC 10 #define ROOMVIEWCONTROLLER_TYPING_TIMEOUT_SEC 10
@ -82,7 +82,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
id membersListener; id membersListener;
// Attachment handling // Attachment handling
CustomImageView *highResImageView; MXCImageView *highResImageView;
NSString *AVAudioSessionCategory; NSString *AVAudioSessionCategory;
MPMoviePlayerController *videoPlayer; MPMoviePlayerController *videoPlayer;
MPMoviePlayerController *tmpVideoPlayer; MPMoviePlayerController *tmpVideoPlayer;
@ -117,7 +117,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
@property (weak, nonatomic) IBOutlet UITableView *messagesTableView; @property (weak, nonatomic) IBOutlet UITableView *messagesTableView;
@property (weak, nonatomic) IBOutlet UIView *controlView; @property (weak, nonatomic) IBOutlet UIView *controlView;
@property (weak, nonatomic) IBOutlet UIButton *optionBtn; @property (weak, nonatomic) IBOutlet UIButton *optionBtn;
@property (weak, nonatomic) IBOutlet ConsoleGrowingTextView *messageTextView; @property (weak, nonatomic) IBOutlet MXCGrowingTextView *messageTextView;
@property (weak, nonatomic) IBOutlet UIButton *sendBtn; @property (weak, nonatomic) IBOutlet UIButton *sendBtn;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *messagesTableViewBottomConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *messagesTableViewBottomConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *controlViewBottomConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *controlViewBottomConstraint;
@ -128,8 +128,8 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
@property (weak, nonatomic) IBOutlet UIBarButtonItem *membersListButtonItem; @property (weak, nonatomic) IBOutlet UIBarButtonItem *membersListButtonItem;
@property (strong, nonatomic) MXRoom *mxRoom; @property (strong, nonatomic) MXRoom *mxRoom;
@property (strong, nonatomic) CustomAlert *actionMenu; @property (strong, nonatomic) MXCAlert *actionMenu;
@property (strong, nonatomic) CustomImageView* imageValidationView; @property (strong, nonatomic) MXCImageView* imageValidationView;
// Messages // Messages
@property (strong, nonatomic)NSMutableArray *messages; @property (strong, nonatomic)NSMutableArray *messages;
@ -317,7 +317,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
isKeyboardObserver = NO; isKeyboardObserver = NO;
} }
[self dismissCustomImageView]; [self dismissAttachmentImageViews];
if (membersListener) { if (membersListener) {
MatrixHandler *mxHandler = [MatrixHandler sharedHandler]; MatrixHandler *mxHandler = [MatrixHandler sharedHandler];
@ -384,7 +384,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
} }
- (void)onAppDidEnterBackground { - (void)onAppDidEnterBackground {
[self dismissCustomImageView]; [self dismissAttachmentImageViews];
} }
- (void)updateUI { - (void)updateUI {
@ -446,11 +446,11 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
// offer to cancel a download only if there is a pending one // offer to cancel a download only if there is a pending one
if (loader) { if (loader) {
self.actionMenu = [[CustomAlert alloc] initWithTitle:nil message:@"Cancel the download ?" style:CustomAlertStyleAlert]; self.actionMenu = [[MXCAlert alloc] initWithTitle:nil message:@"Cancel the download ?" style:MXCAlertStyleAlert];
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"OK" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"OK" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
// get again the loader, the cell could have been reused. // get again the loader, the cell could have been reused.
MediaLoader *loader = [MediaManager existingDownloaderForURL:url inFolder:weakSelf.roomId]; MediaLoader *loader = [MediaManager existingDownloaderForURL:url inFolder:weakSelf.roomId];
@ -1115,7 +1115,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
# pragma mark - Attachment handling # pragma mark - Attachment handling
- (void)showAttachmentView:(UIGestureRecognizer *)gestureRecognizer { - (void)showAttachmentView:(UIGestureRecognizer *)gestureRecognizer {
CustomImageView *attachment = (CustomImageView*)gestureRecognizer.view; MXCImageView *attachment = (MXCImageView*)gestureRecognizer.view;
[self dismissKeyboard]; [self dismissKeyboard];
// Retrieve attachment information // Retrieve attachment information
@ -1124,7 +1124,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
if (msgtype == RoomMessageTypeImage) { if (msgtype == RoomMessageTypeImage) {
NSString *url = content[@"url"]; NSString *url = content[@"url"];
if (url.length) { if (url.length) {
highResImageView = [[CustomImageView alloc] initWithFrame:self.membersView.frame]; highResImageView = [[MXCImageView alloc] initWithFrame:self.membersView.frame];
highResImageView.stretchable = YES; highResImageView.stretchable = YES;
highResImageView.fullScreen = YES; highResImageView.fullScreen = YES;
highResImageView.mediaFolder = self.roomId; highResImageView.mediaFolder = self.roomId;
@ -1211,7 +1211,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMediaDownloadDidFinishNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:kMediaDownloadDidFinishNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMediaDownloadDidFailNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:kMediaDownloadDidFailNotification object:nil];
[self dismissCustomImageView]; [self dismissAttachmentImageViews];
// Restore audio category // Restore audio category
if (AVAudioSessionCategory) { if (AVAudioSessionCategory) {
@ -1298,7 +1298,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
if (videoThumbnail && videoURL) { if (videoThumbnail && videoURL) {
// Prepare video thumbnail description // Prepare video thumbnail description
NSUInteger thumbnailSize = ROOM_MESSAGE_MAX_ATTACHMENTVIEW_WIDTH; NSUInteger thumbnailSize = ROOM_MESSAGE_MAX_ATTACHMENTVIEW_WIDTH;
UIImage *thumbnail = [ConsoleTools resize:videoThumbnail toFitInSize:CGSizeMake(thumbnailSize, thumbnailSize)]; UIImage *thumbnail = [MXCTools resize:videoThumbnail toFitInSize:CGSizeMake(thumbnailSize, thumbnailSize)];
// Create the local event displayed during uploading // Create the local event displayed during uploading
MXEvent *localEvent = [self addLocalEchoEventForAttachedVideo:thumbnail videoPath:videoURL.path]; MXEvent *localEvent = [self addLocalEchoEventForAttachedVideo:thumbnail videoPath:videoURL.path];
@ -2058,8 +2058,8 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
if (self.actionMenu) { if (self.actionMenu) {
[self.actionMenu dismiss:NO]; [self.actionMenu dismiss:NO];
} }
self.actionMenu = [[CustomAlert alloc] initWithTitle:nil message:alertMsg style:CustomAlertStyleAlert]; self.actionMenu = [[MXCAlert alloc] initWithTitle:nil message:alertMsg style:MXCAlertStyleAlert];
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
[self.actionMenu showInViewController:self]; [self.actionMenu showInViewController:self];
@ -2152,19 +2152,19 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
// Display action menu: Add attachments, Invite user... // Display action menu: Add attachments, Invite user...
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
self.actionMenu = [[CustomAlert alloc] initWithTitle:@"Select an action:" message:nil style:CustomAlertStyleActionSheet]; self.actionMenu = [[MXCAlert alloc] initWithTitle:@"Select an action:" message:nil style:MXCAlertStyleActionSheet];
// Attachments // Attachments
[self.actionMenu addActionWithTitle:@"Attach" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [self.actionMenu addActionWithTitle:@"Attach" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
if (weakSelf) { if (weakSelf) {
// Ask for attachment type // Ask for attachment type
weakSelf.actionMenu = [[CustomAlert alloc] initWithTitle:@"Select an attachment type:" message:nil style:CustomAlertStyleActionSheet]; weakSelf.actionMenu = [[MXCAlert alloc] initWithTitle:@"Select an attachment type:" message:nil style:MXCAlertStyleActionSheet];
[weakSelf.actionMenu addActionWithTitle:@"Media" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [weakSelf.actionMenu addActionWithTitle:@"Media" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
if (weakSelf) { if (weakSelf) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.actionMenu = [[CustomAlert alloc] initWithTitle:@"Media:" message:nil style:CustomAlertStyleActionSheet]; weakSelf.actionMenu = [[MXCAlert alloc] initWithTitle:@"Media:" message:nil style:MXCAlertStyleActionSheet];
[weakSelf.actionMenu addActionWithTitle:@"Photo Library" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [weakSelf.actionMenu addActionWithTitle:@"Photo Library" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
if (weakSelf) { if (weakSelf) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
@ -2178,7 +2178,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
} }
}]; }];
[weakSelf.actionMenu addActionWithTitle:@"Take Photo or Video" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [weakSelf.actionMenu addActionWithTitle:@"Take Photo or Video" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
if (weakSelf) { if (weakSelf) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
@ -2192,7 +2192,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
} }
}]; }];
weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
[weakSelf.actionMenu showInViewController:weakSelf]; [weakSelf.actionMenu showInViewController:weakSelf];
@ -2201,25 +2201,25 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
} }
}]; }];
weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
[weakSelf.actionMenu showInViewController:weakSelf]; [weakSelf.actionMenu showInViewController:weakSelf];
} }
}]; }];
// Invitation // Invitation
[self.actionMenu addActionWithTitle:@"Invite" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [self.actionMenu addActionWithTitle:@"Invite" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
if (weakSelf) { if (weakSelf) {
// Ask for userId to invite // Ask for userId to invite
weakSelf.actionMenu = [[CustomAlert alloc] initWithTitle:@"User ID:" message:nil style:CustomAlertStyleAlert]; weakSelf.actionMenu = [[MXCAlert alloc] initWithTitle:@"User ID:" message:nil style:MXCAlertStyleAlert];
weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
[weakSelf.actionMenu addTextFieldWithConfigurationHandler:^(UITextField *textField) { [weakSelf.actionMenu addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.secureTextEntry = NO; textField.secureTextEntry = NO;
textField.placeholder = @"ex: @bob:homeserver"; textField.placeholder = @"ex: @bob:homeserver";
}]; }];
[weakSelf.actionMenu addActionWithTitle:@"Invite" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [weakSelf.actionMenu addActionWithTitle:@"Invite" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
UITextField *textField = [alert textFieldAtIndex:0]; UITextField *textField = [alert textFieldAtIndex:0];
NSString *userId = textField.text; NSString *userId = textField.text;
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
@ -2236,7 +2236,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
[weakSelf.actionMenu showInViewController:weakSelf]; [weakSelf.actionMenu showInViewController:weakSelf];
} }
}]; }];
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
weakSelf.actionMenu.sourceView = weakSelf.optionBtn; weakSelf.actionMenu.sourceView = weakSelf.optionBtn;
@ -2296,19 +2296,19 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
self.actionMenu = [[CustomAlert alloc] initWithTitle:@"Resend the message" self.actionMenu = [[MXCAlert alloc] initWithTitle:@"Resend the message"
message:(roomMessage.messageType == RoomMessageTypeText) ? textMessage : nil message:(roomMessage.messageType == RoomMessageTypeText) ? textMessage : nil
style:CustomAlertStyleAlert]; style:MXCAlertStyleAlert];
self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel" self.actionMenu.cancelButtonIndex = [self.actionMenu addActionWithTitle:@"Cancel"
style:CustomAlertActionStyleDefault style:MXCAlertActionStyleDefault
handler:^(CustomAlert *alert) { handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
}]; }];
[self.actionMenu addActionWithTitle:@"OK" [self.actionMenu addActionWithTitle:@"OK"
style:CustomAlertActionStyleDefault style:MXCAlertActionStyleDefault
handler:^(CustomAlert *alert) { handler:^(MXCAlert *alert) {
weakSelf.actionMenu = nil; weakSelf.actionMenu = nil;
if (roomMessage.messageType == RoomMessageTypeText) { if (roomMessage.messageType == RoomMessageTypeText) {
@ -2964,7 +2964,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
}]; }];
} }
- (void)dismissCustomImageView { - (void)dismissAttachmentImageViews {
if (self.imageValidationView) { if (self.imageValidationView) {
[self.imageValidationView dismissSelection]; [self.imageValidationView dismissSelection];
[self.imageValidationView removeFromSuperview]; [self.imageValidationView removeFromSuperview];
@ -2995,24 +2995,24 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
// wait that the media picker is dismissed to have the valid membersView frame // wait that the media picker is dismissed to have the valid membersView frame
// else it would include a status bar height offset // else it would include a status bar height offset
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
self.imageValidationView = [[CustomImageView alloc] initWithFrame:self.membersView.frame]; self.imageValidationView = [[MXCImageView alloc] initWithFrame:self.membersView.frame];
self.imageValidationView.stretchable = YES; self.imageValidationView.stretchable = YES;
self.imageValidationView.fullScreen = YES; self.imageValidationView.fullScreen = YES;
self.imageValidationView.mediaFolder = self.roomId; self.imageValidationView.mediaFolder = self.roomId;
// the user validates the image // the user validates the image
[self.imageValidationView setRightButtonTitle:@"OK" handler:^(CustomImageView* imageView, NSString* buttonTitle) { [self.imageValidationView setRightButtonTitle:@"OK" handler:^(MXCImageView* imageView, NSString* buttonTitle) {
// dismiss the image view // dismiss the image view
[weakSelf dismissCustomImageView]; [weakSelf dismissAttachmentImageViews];
[weakSelf sendImage:selectedImage]; [weakSelf sendImage:selectedImage];
}]; }];
// the user wants to use an other image // the user wants to use an other image
[self.imageValidationView setLeftButtonTitle:@"Cancel" handler:^(CustomImageView* imageView, NSString* buttonTitle) { [self.imageValidationView setLeftButtonTitle:@"Cancel" handler:^(MXCImageView* imageView, NSString* buttonTitle) {
// dismiss the image view // dismiss the image view
[weakSelf dismissCustomImageView]; [weakSelf dismissAttachmentImageViews];
// Open again media gallery // Open again media gallery
UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init]; UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init];

View file

@ -88,7 +88,7 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
@property (strong, nonatomic) IBOutlet UIView *activityIndicatorBackgroundView; @property (strong, nonatomic) IBOutlet UIView *activityIndicatorBackgroundView;
@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator; @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (strong, nonatomic) CustomAlert* customAlert; @property (strong, nonatomic) MXCAlert* customAlert;
- (IBAction)onButtonPressed:(id)sender; - (IBAction)onButtonPressed:(id)sender;
@ -174,13 +174,13 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
self.customAlert = [[CustomAlert alloc] initWithTitle:nil message:@"Save profile update" style:CustomAlertStyleAlert]; self.customAlert = [[MXCAlert alloc] initWithTitle:nil message:@"Save profile update" style:MXCAlertStyleAlert];
self.customAlert.cancelButtonIndex = [self.customAlert addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { self.customAlert.cancelButtonIndex = [self.customAlert addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
handler(); handler();
weakSelf.customAlert = nil; weakSelf.customAlert = nil;
}]; }];
[self.customAlert addActionWithTitle:@"OK" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [self.customAlert addActionWithTitle:@"OK" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[weakSelf saveDisplayName]; [weakSelf saveDisplayName];
weakSelf.customAlert = nil; weakSelf.customAlert = nil;
@ -219,7 +219,7 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
} }
// Cancel potential error alerts // Cancel potential error alerts
for (CustomAlert *alert in errorAlerts){ for (MXCAlert *alert in errorAlerts){
[alert dismiss:NO]; [alert dismiss:NO];
} }
@ -348,14 +348,14 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
} }
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey]; NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
CustomAlert *alert = [[CustomAlert alloc] initWithTitle:title message:msg style:CustomAlertStyleAlert]; MXCAlert *alert = [[MXCAlert alloc] initWithTitle:title message:msg style:MXCAlertStyleAlert];
[errorAlerts addObject:alert]; [errorAlerts addObject:alert];
alert.cancelButtonIndex = [alert addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { alert.cancelButtonIndex = [alert addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[errorAlerts removeObject:alert]; [errorAlerts removeObject:alert];
// Remove change // Remove change
self.userDisplayName.text = currentDisplayName; self.userDisplayName.text = currentDisplayName;
}]; }];
[alert addActionWithTitle:@"Retry" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [alert addActionWithTitle:@"Retry" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[errorAlerts removeObject:alert]; [errorAlerts removeObject:alert];
[self saveDisplayName]; [self saveDisplayName];
}]; }];
@ -428,15 +428,15 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
} }
NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey]; NSString *msg = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
CustomAlert *alert = [[CustomAlert alloc] initWithTitle:title message:msg style:CustomAlertStyleAlert]; MXCAlert *alert = [[MXCAlert alloc] initWithTitle:title message:msg style:MXCAlertStyleAlert];
[errorAlerts addObject:alert]; [errorAlerts addObject:alert];
alert.cancelButtonIndex = [alert addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { alert.cancelButtonIndex = [alert addActionWithTitle:@"Cancel" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[errorAlerts removeObject:alert]; [errorAlerts removeObject:alert];
// Remove change // Remove change
uploadedPictureURL = nil; uploadedPictureURL = nil;
[self updateUserPicture:[MatrixHandler sharedHandler].mxSession.myUser.avatarUrl]; [self updateUserPicture:[MatrixHandler sharedHandler].mxSession.myUser.avatarUrl];
}]; }];
[alert addActionWithTitle:@"Retry" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) { [alert addActionWithTitle:@"Retry" style:MXCAlertActionStyleDefault handler:^(MXCAlert *alert) {
[errorAlerts removeObject:alert]; [errorAlerts removeObject:alert];
[self savePicture]; [self savePicture];
}]; }];