diff --git a/Vector.xcodeproj/project.pbxproj b/Vector.xcodeproj/project.pbxproj index f19f121bf..6a038ecf0 100644 --- a/Vector.xcodeproj/project.pbxproj +++ b/Vector.xcodeproj/project.pbxproj @@ -22,10 +22,6 @@ 71C5F2951C074ACC004C094B /* RoomSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71C5F2941C074ACC004C094B /* RoomSettingsViewController.m */; }; 71EBE66D1C04C4D300E7D953 /* RoomActivitiesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EBE66B1C04C4D300E7D953 /* RoomActivitiesView.m */; }; 71EBE66E1C04C4D300E7D953 /* RoomActivitiesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 71EBE66C1C04C4D300E7D953 /* RoomActivitiesView.xib */; }; - F001D75E1B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F001D7551B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.m */; }; - F001D75F1B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F001D7561B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.xib */; }; - F001D7601B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F001D7581B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.m */; }; - F001D7611B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F001D7591B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.xib */; }; F001D7621B8207C000A162C3 /* RoomInputToolbarView.m in Sources */ = {isa = PBXBuildFile; fileRef = F001D75C1B8207C000A162C3 /* RoomInputToolbarView.m */; }; F001D7631B8207C000A162C3 /* RoomInputToolbarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F001D75D1B8207C000A162C3 /* RoomInputToolbarView.xib */; }; F001D76C1B821E4F00A162C3 /* MediaPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F001D76B1B821E4F00A162C3 /* MediaPickerViewController.m */; }; @@ -117,6 +113,22 @@ F094AA371B78E42600B1FBBF /* RoomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F094AA271B78E42600B1FBBF /* RoomViewController.m */; }; F094AA381B78E42600B1FBBF /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F094AA291B78E42600B1FBBF /* SettingsViewController.m */; }; F0A1CD221B9F4BBA00F9C15C /* RoomParticipantsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0A1CD211B9F4BBA00F9C15C /* RoomParticipantsViewController.m */; }; + F0C34B611C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B561C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.m */; }; + F0C34B621C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B571C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.xib */; }; + F0C34B631C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B591C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m */; }; + F0C34B641C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B5A1C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib */; }; + F0C34B651C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B5C1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.m */; }; + F0C34B661C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B5D1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.xib */; }; + F0C34B671C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B5F1C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m */; }; + F0C34B681C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B601C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib */; }; + F0C34B6F1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B6A1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m */; }; + F0C34B701C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B6B1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib */; }; + F0C34B711C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34B6D1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m */; }; + F0C34B721C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34B6E1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib */; }; + F0C34CB11C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34CAC1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.m */; }; + F0C34CB21C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34CAD1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib */; }; + F0C34CB31C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F0C34CAF1C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.m */; }; + F0C34CB41C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0C34CB01C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib */; }; F0DD7D821B7B363300C4BE02 /* RoomCreationStep1ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0DD7D811B7B363300C4BE02 /* RoomCreationStep1ViewController.m */; }; F0DD7D881B7B507100C4BE02 /* RoomCreationStep2ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0DD7D871B7B507100C4BE02 /* RoomCreationStep2ViewController.m */; }; /* End PBXBuildFile section */ @@ -160,12 +172,6 @@ 71EBE66B1C04C4D300E7D953 /* RoomActivitiesView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RoomActivitiesView.m; path = RoomActivitiesView/RoomActivitiesView.m; sourceTree = ""; }; 71EBE66C1C04C4D300E7D953 /* RoomActivitiesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RoomActivitiesView.xib; path = RoomActivitiesView/RoomActivitiesView.xib; sourceTree = ""; }; 9B179239B79688A61A3F465F /* libPods-Vector.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Vector.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - F001D7541B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomIncomingBubbleTableViewCell.h; sourceTree = ""; }; - F001D7551B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomIncomingBubbleTableViewCell.m; sourceTree = ""; }; - F001D7561B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomIncomingBubbleTableViewCell.xib; sourceTree = ""; }; - F001D7571B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingBubbleTableViewCell.h; sourceTree = ""; }; - F001D7581B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingBubbleTableViewCell.m; sourceTree = ""; }; - F001D7591B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingBubbleTableViewCell.xib; sourceTree = ""; }; F001D75B1B8207C000A162C3 /* RoomInputToolbarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomInputToolbarView.h; sourceTree = ""; }; F001D75C1B8207C000A162C3 /* RoomInputToolbarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomInputToolbarView.m; sourceTree = ""; }; F001D75D1B8207C000A162C3 /* RoomInputToolbarView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomInputToolbarView.xib; sourceTree = ""; }; @@ -277,6 +283,30 @@ F094AA291B78E42600B1FBBF /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = ""; }; F0A1CD201B9F4BBA00F9C15C /* RoomParticipantsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomParticipantsViewController.h; sourceTree = ""; }; F0A1CD211B9F4BBA00F9C15C /* RoomParticipantsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomParticipantsViewController.m; sourceTree = ""; }; + F0C34B551C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingAttachmentBubbleCell.h; sourceTree = ""; }; + F0C34B561C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingAttachmentBubbleCell.m; sourceTree = ""; }; + F0C34B571C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingAttachmentBubbleCell.xib; sourceTree = ""; }; + F0C34B581C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h; sourceTree = ""; }; + F0C34B591C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m; sourceTree = ""; }; + F0C34B5A1C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib; sourceTree = ""; }; + F0C34B5B1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingTextMsgBubbleCell.h; sourceTree = ""; }; + F0C34B5C1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingTextMsgBubbleCell.m; sourceTree = ""; }; + F0C34B5D1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingTextMsgBubbleCell.xib; sourceTree = ""; }; + F0C34B5E1C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h; sourceTree = ""; }; + F0C34B5F1C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m; sourceTree = ""; }; + F0C34B601C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib; sourceTree = ""; }; + F0C34B691C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h; sourceTree = ""; }; + F0C34B6A1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m; sourceTree = ""; }; + F0C34B6B1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib; sourceTree = ""; }; + F0C34B6C1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h; sourceTree = ""; }; + F0C34B6D1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m; sourceTree = ""; }; + F0C34B6E1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib; sourceTree = ""; }; + F0C34CAB1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomIncomingAttachmentWithPaginationTitleBubbleCell.h; sourceTree = ""; }; + F0C34CAC1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomIncomingAttachmentWithPaginationTitleBubbleCell.m; sourceTree = ""; }; + F0C34CAD1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib; sourceTree = ""; }; + F0C34CAE1C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomIncomingTextMsgWithPaginationTitleBubbleCell.h; sourceTree = ""; }; + F0C34CAF1C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomIncomingTextMsgWithPaginationTitleBubbleCell.m; sourceTree = ""; }; + F0C34CB01C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib; sourceTree = ""; }; F0DD7D801B7B363300C4BE02 /* RoomCreationStep1ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomCreationStep1ViewController.h; sourceTree = ""; }; F0DD7D811B7B363300C4BE02 /* RoomCreationStep1ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomCreationStep1ViewController.m; sourceTree = ""; }; F0DD7D861B7B507100C4BE02 /* RoomCreationStep2ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomCreationStep2ViewController.h; sourceTree = ""; }; @@ -381,12 +411,30 @@ F001D7531B8207C000A162C3 /* RoomBubbleList */ = { isa = PBXGroup; children = ( - F001D7541B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.h */, - F001D7551B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.m */, - F001D7561B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.xib */, - F001D7571B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.h */, - F001D7581B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.m */, - F001D7591B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.xib */, + F0C34CAB1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.h */, + F0C34CAC1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.m */, + F0C34CAD1C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib */, + F0C34CAE1C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.h */, + F0C34CAF1C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.m */, + F0C34CB01C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib */, + F0C34B551C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.h */, + F0C34B561C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.m */, + F0C34B571C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.xib */, + F0C34B581C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h */, + F0C34B591C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m */, + F0C34B5A1C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib */, + F0C34B691C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h */, + F0C34B6A1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m */, + F0C34B6B1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib */, + F0C34B5B1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.h */, + F0C34B5C1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.m */, + F0C34B5D1C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.xib */, + F0C34B5E1C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h */, + F0C34B5F1C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m */, + F0C34B601C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib */, + F0C34B6C1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h */, + F0C34B6D1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m */, + F0C34B6E1C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib */, ); path = RoomBubbleList; sourceTree = ""; @@ -746,6 +794,7 @@ F02528E01C11B6FC00E1FE1B /* create_room.png in Resources */, F02528DF1C11B6FC00E1FE1B /* camera_video.png in Resources */, F02528E31C11B6FC00E1FE1B /* favorite_icon.png in Resources */, + F0C34B681C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib in Resources */, F02528F11C11B6FC00E1FE1B /* placeholder@3x.png in Resources */, F02528FB1C11B6FC00E1FE1B /* selection_tick@2x.png in Resources */, F02529081C11B6FC00E1FE1B /* unmute_icon@3x.png in Resources */, @@ -768,14 +817,16 @@ F02528D31C11B6FC00E1FE1B /* add.png in Resources */, F02529061C11B6FC00E1FE1B /* unmute_icon.png in Resources */, F02529041C11B6FC00E1FE1B /* typing@2x.png in Resources */, + F0C34B641C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib in Resources */, F02528D61C11B6FC00E1FE1B /* camera_capture@2x.png in Resources */, 71046D601C0C86C600DCA984 /* RoomTitleViewWithTopic.xib in Resources */, F02528D51C11B6FC00E1FE1B /* camera_capture.png in Resources */, F02528EA1C11B6FC00E1FE1B /* low_priority_icon@2x.png in Resources */, - F001D7611B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.xib in Resources */, F02528EE1C11B6FC00E1FE1B /* mute_icon@3x.png in Resources */, F02529071C11B6FC00E1FE1B /* unmute_icon@2x.png in Resources */, + F0C34B701C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib in Resources */, F025290D1C11B6FC00E1FE1B /* voice_call_icon@2x.png in Resources */, + F0C34CB21C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib in Resources */, F02528DC1C11B6FC00E1FE1B /* camera_switch.png in Resources */, F02528E81C11B6FC00E1FE1B /* logo@2x.png in Resources */, F02528E21C11B6FC00E1FE1B /* create_room@3x.png in Resources */, @@ -795,6 +846,7 @@ F02528FF1C11B6FC00E1FE1B /* selection_untick@3x.png in Resources */, 717928481C03852C00407D96 /* TableViewCellWithLabelAndLargeTextView.xib in Resources */, F02528F01C11B6FC00E1FE1B /* placeholder@2x.png in Resources */, + F0C34CB41C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib in Resources */, F02528E41C11B6FC00E1FE1B /* favorite_icon@2x.png in Resources */, F001D76E1B83156000A162C3 /* MediaPickerViewController.xib in Resources */, F02529031C11B6FC00E1FE1B /* typing.png in Resources */, @@ -804,16 +856,18 @@ F02528F31C11B6FC00E1FE1B /* remove_icon@2x.png in Resources */, F02528E61C11B6FC00E1FE1B /* icon_video.png in Resources */, F02528D71C11B6FC00E1FE1B /* camera_capture@3x.png in Resources */, - F001D75F1B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.xib in Resources */, F02528EF1C11B6FC00E1FE1B /* placeholder.png in Resources */, F094A9B41B78D8F000B1FBBF /* Main.storyboard in Resources */, F094A9B91B78D8F000B1FBBF /* LaunchScreen.xib in Resources */, + F0C34B621C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.xib in Resources */, F094A9B61B78D8F000B1FBBF /* Images.xcassets in Resources */, F094AA061B78E3D400B1FBBF /* Vector-Defaults.plist in Resources */, F00C47871BFF77C800DBABC9 /* RecentTableViewCell.xib in Resources */, F02528E51C11B6FC00E1FE1B /* favorite_icon@3x.png in Resources */, F02529051C11B6FC00E1FE1B /* typing@3x.png in Resources */, F02528E71C11B6FC00E1FE1B /* logo.png in Resources */, + F0C34B721C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib in Resources */, + F0C34B661C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.xib in Resources */, F094AA2C1B78E42600B1FBBF /* Vector.strings in Resources */, F02528D41C11B6FC00E1FE1B /* add@2x.png in Resources */, F02528FD1C11B6FC00E1FE1B /* selection_untick.png in Resources */, @@ -887,13 +941,16 @@ F094A9AB1B78D8F000B1FBBF /* AppDelegate.m in Sources */, 717928491C03852C00407D96 /* TableViewCellWithLabelAndTextField.m in Sources */, F094AA2F1B78E42600B1FBBF /* AccountDetailsViewController.m in Sources */, + F0C34B671C15C28300C36F09 /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m in Sources */, + F0C34B651C15C28300C36F09 /* RoomOutgoingTextMsgBubbleCell.m in Sources */, + F0C34B711C15CA2E00C36F09 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m in Sources */, F094AA051B78E3D400B1FBBF /* empty.mm in Sources */, F0A1CD221B9F4BBA00F9C15C /* RoomParticipantsViewController.m in Sources */, F001D76C1B821E4F00A162C3 /* MediaPickerViewController.m in Sources */, F084DAAE1BB57BD100B4C530 /* AuthInputsEmailIdentityBasedView.m in Sources */, - F001D75E1B8207C000A162C3 /* RoomIncomingBubbleTableViewCell.m in Sources */, 71352D591C10569F001D50B0 /* AvatarGenerator.m in Sources */, 717928471C03852C00407D96 /* TableViewCellWithLabelAndLargeTextView.m in Sources */, + F0C34B6F1C15CA2E00C36F09 /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m in Sources */, 7165A25B1C05CD42003635D7 /* SegmentedViewController.m in Sources */, F094AA321B78E42600B1FBBF /* GlobalNotificationSettingsViewController.m in Sources */, F094A9A81B78D8F000B1FBBF /* main.m in Sources */, @@ -901,15 +958,18 @@ F0DD7D881B7B507100C4BE02 /* RoomCreationStep2ViewController.m in Sources */, 71352D651C10A265001D50B0 /* Contact.m in Sources */, F094AA2A1B78E42600B1FBBF /* RageShakeManager.m in Sources */, + F0C34CB11C16269D00C36F09 /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.m in Sources */, F094AA351B78E42600B1FBBF /* RecentsViewController.m in Sources */, F08BE09E1B87025B00C480FB /* EventFormatter.m in Sources */, F05895001B8B7E6600B73E85 /* RoomBubbleCellData.m in Sources */, + F0C34B611C15C28300C36F09 /* RoomOutgoingAttachmentBubbleCell.m in Sources */, 71C5F2951C074ACC004C094B /* RoomSettingsViewController.m in Sources */, F001D7621B8207C000A162C3 /* RoomInputToolbarView.m in Sources */, 71EBE66D1C04C4D300E7D953 /* RoomActivitiesView.m in Sources */, F08BE0A21B87064000C480FB /* RoomDataSource.m in Sources */, - F001D7601B8207C000A162C3 /* RoomOutgoingBubbleTableViewCell.m in Sources */, + F0C34CB31C16269D00C36F09 /* RoomIncomingTextMsgWithPaginationTitleBubbleCell.m in Sources */, 71046D5E1C0C639300DCA984 /* RoomTitleViewWithTopic.m in Sources */, + F0C34B631C15C28300C36F09 /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m in Sources */, F094AA371B78E42600B1FBBF /* RoomViewController.m in Sources */, F00C478B1BFF854400DBABC9 /* RecentsDataSource.m in Sources */, 717928451C03852C00407D96 /* TableViewCellSeparator.m in Sources */, diff --git a/Vector/Model/Room/RoomBubbleCellData.m b/Vector/Model/Room/RoomBubbleCellData.m index 3c9315602..45628b9c3 100644 --- a/Vector/Model/Room/RoomBubbleCellData.m +++ b/Vector/Model/Room/RoomBubbleCellData.m @@ -30,152 +30,11 @@ if (self) { - // use the matrix style placeholder + // use the vector style placeholder self.senderAvatarPlaceholder = [AvatarGenerator generateRoomMemberAvatar:self.senderId displayName:self.senderDisplayName]; } return self; } -- (NSAttributedString*)attributedTextMessage -{ - if (!attributedTextMessage.length && bubbleComponents.count) - { - if (super.showBubbleDateTime == NO) - { - return super.attributedTextMessage; - } - else - { - // Create attributed string by adding each component timestamp - NSMutableAttributedString *currentAttributedTextMsg; - NSAttributedString *dateTimeAttributedStr; - NSDictionary *attributes; - if ([self.eventFormatter isKindOfClass:[EventFormatter class]]) - { - attributes = [(EventFormatter*)self.eventFormatter stringAttributesForEventTimestamp]; - } - - for (MXKRoomBubbleComponent* component in bubbleComponents) - { - if (!currentAttributedTextMsg) - { - currentAttributedTextMsg = [[NSMutableAttributedString alloc] initWithAttributedString:component.attributedTextMessage]; - } - else - { - // Append attributed text - [currentAttributedTextMsg appendAttributedString:[MXKRoomBubbleCellDataWithAppendingMode messageSeparator]]; - [currentAttributedTextMsg appendAttributedString:component.attributedTextMessage]; - } - - // Append component timestamp - NSString *dateTimeStr = [NSString stringWithFormat:@" %@", [self.eventFormatter dateStringFromDate:component.date withTime:YES]]; - if (attributes) - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr attributes:attributes]; - } - else - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr]; - } - [currentAttributedTextMsg appendAttributedString:dateTimeAttributedStr]; - } - - attributedTextMessage = currentAttributedTextMsg; - } - } - - return attributedTextMessage; -} - -- (void)setShowBubbleDateTime:(BOOL)showBubbleDateTime -{ - if (super.showBubbleDateTime != showBubbleDateTime) - { - super.showBubbleDateTime = showBubbleDateTime; - - // Attributed string must be rebuilt - self.attributedTextMessage = nil; - } -} - -#pragma mark - - -- (void)prepareBubbleComponentsPosition -{ - if (super.showBubbleDateTime == NO) - { - [super prepareBubbleComponentsPosition]; - } - else - { - // We will let super prepare only the first component position by disabling shouldUpdateComponentsPosition flag - BOOL savedShouldUpdateComponentsPosition = shouldUpdateComponentsPosition; - shouldUpdateComponentsPosition = NO; - - [super prepareBubbleComponentsPosition]; - - // Check whether the position of other components need to be refreshed - if (self.attachment || !savedShouldUpdateComponentsPosition || bubbleComponents.count < 2) - { - return; - } - - // Compute height of the first text component by considering displayed timestamp - NSAttributedString *dateTimeAttributedStr; - NSDictionary *attributes; - if ([self.eventFormatter isKindOfClass:[EventFormatter class]]) - { - attributes = [(EventFormatter*)self.eventFormatter stringAttributesForEventTimestamp]; - } - - MXKRoomBubbleComponent *component = [bubbleComponents firstObject]; - NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithAttributedString:component.attributedTextMessage]; - // Append component timestamp - NSString *dateTimeStr = [NSString stringWithFormat:@" %@", [self.eventFormatter dateStringFromDate:component.date withTime:YES]]; - if (attributes) - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr attributes:attributes]; - } - else - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr]; - } - [attributedString appendAttributedString:dateTimeAttributedStr]; - - CGFloat componentHeight = [self rawTextHeight:attributedString]; - - // Set position for each other component - CGFloat positionY = component.position.y; - CGFloat cumulatedHeight = 0; - - for (NSUInteger index = 1; index < bubbleComponents.count; index++) - { - cumulatedHeight += componentHeight; - positionY += componentHeight; - - component = [bubbleComponents objectAtIndex:index]; - component.position = CGPointMake(0, positionY); - - // Compute height of the current component - [attributedString appendAttributedString:[MXKRoomBubbleCellDataWithAppendingMode messageSeparator]]; - [attributedString appendAttributedString:component.attributedTextMessage]; - - dateTimeStr = [NSString stringWithFormat:@" %@", [self.eventFormatter dateStringFromDate:component.date withTime:YES]]; - if (attributes) - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr attributes:attributes]; - } - else - { - dateTimeAttributedStr = [[NSAttributedString alloc] initWithString:dateTimeStr]; - } - [attributedString appendAttributedString:dateTimeAttributedStr]; - - componentHeight = [self rawTextHeight:attributedString] - cumulatedHeight; - } - } -} - @end diff --git a/Vector/Model/Room/RoomDataSource.m b/Vector/Model/Room/RoomDataSource.m index 2249b409c..cc5a9a901 100644 --- a/Vector/Model/Room/RoomDataSource.m +++ b/Vector/Model/Room/RoomDataSource.m @@ -18,8 +18,6 @@ #import "EventFormatter.h" #import "RoomBubbleCellData.h" -#import "RoomIncomingBubbleTableViewCell.h" -#import "RoomOutgoingBubbleTableViewCell.h" @implementation RoomDataSource @@ -31,16 +29,6 @@ // Replace default Cell data class [self registerCellDataClass:RoomBubbleCellData.class forCellIdentifier:kMXKRoomBubbleCellDataIdentifier]; - // Replace cell view classes - [self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingTextMsgCellIdentifier]; - [self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingTextMsgHiddenSenderCellIdentifier]; - [self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingAttachmentCellIdentifier]; - [self registerCellViewClass:RoomIncomingBubbleTableViewCell.class forCellIdentifier:kMXKRoomIncomingAttachmentHiddenSenderCellIdentifier]; - [self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingTextMsgCellIdentifier]; - [self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingTextMsgHiddenSenderCellIdentifier]; - [self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingAttachmentCellIdentifier]; - [self registerCellViewClass:RoomOutgoingBubbleTableViewCell.class forCellIdentifier:kMXKRoomOutgoingAttachmentHiddenSenderCellIdentifier]; - // Replace event formatter self.eventFormatter = [[EventFormatter alloc] initWithMatrixSession:self.mxSession]; diff --git a/Vector/Model/RoomList/RecentsDataSource.m b/Vector/Model/RoomList/RecentsDataSource.m index 7ea588901..0f255d76f 100644 --- a/Vector/Model/RoomList/RecentsDataSource.m +++ b/Vector/Model/RoomList/RecentsDataSource.m @@ -16,8 +16,6 @@ #import "RecentsDataSource.h" -#import "RecentTableViewCell.h" - #import "EventFormatter.h" #import "VectorDesignValues.h" @@ -44,9 +42,6 @@ self = [super init]; if (self) { - // Reset default view classes - [self registerCellViewClass:RecentTableViewCell.class forCellIdentifier:kMXKRecentCellIdentifier]; - // Replace event formatter self.eventFormatter = [[EventFormatter alloc] initWithMatrixSession:self.mxSession]; @@ -210,11 +205,12 @@ - (CGFloat)cellHeightAtIndexPath:(NSIndexPath *)indexPath { + // Override this method here to use our own cellDataAtIndexPath id cellData = [self cellDataAtIndexPath:indexPath]; - if (cellData) + if (cellData && self.delegate) { - Class class = [self cellViewClassForCellIdentifier:kMXKRecentCellIdentifier]; + Class class = [self.delegate cellViewClassForCellData:cellData]; return [class heightForCellData:cellData withMaximumWidth:0]; } diff --git a/Vector/ViewController/RecentsViewController.m b/Vector/ViewController/RecentsViewController.m index 32fb7da09..95557f5c2 100644 --- a/Vector/ViewController/RecentsViewController.m +++ b/Vector/ViewController/RecentsViewController.m @@ -17,6 +17,8 @@ #import "RecentsViewController.h" #import "RoomViewController.h" +#import "RecentTableViewCell.h" + #import "RageShakeManager.h" #import "NSBundle+MatrixKit.h" @@ -76,6 +78,9 @@ // The view controller handles itself the selected recent self.delegate = self; + + // Register here the customized cell view class used to render recents + [self.recentsTableView registerNib:RecentTableViewCell.nib forCellReuseIdentifier:RecentTableViewCell.defaultReuseIdentifier]; } - (void)dealloc @@ -417,6 +422,18 @@ #pragma mark - MXKDataSourceDelegate +- (Class)cellViewClassForCellData:(MXKCellData*)cellData +{ + // Return the customized recent table view cell + return RecentTableViewCell.class; +} + +- (NSString *)cellReuseIdentifierForCellData:(MXKCellData*)cellData +{ + // Return the customized recent table view cell identifier + return RecentTableViewCell.defaultReuseIdentifier; +} + - (void)dataSource:(MXKDataSource *)dataSource didCellChange:(id)changes { [self.recentsTableView reloadData]; diff --git a/Vector/ViewController/RoomViewController.m b/Vector/ViewController/RoomViewController.m index 0b9bf84db..ad2c5eab4 100644 --- a/Vector/ViewController/RoomViewController.m +++ b/Vector/ViewController/RoomViewController.m @@ -30,6 +30,16 @@ #import "SegmentedViewController.h" #import "RoomSettingsViewController.h" +#import "RoomIncomingTextMsgWithPaginationTitleBubbleCell.h" +#import "RoomIncomingAttachmentWithPaginationTitleBubbleCell.h" + +#import "RoomOutgoingAttachmentBubbleCell.h" +#import "RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h" +#import "RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h" +#import "RoomOutgoingTextMsgBubbleCell.h" +#import "RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h" +#import "RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h" + #import "AvatarGenerator.h" @interface RoomViewController () @@ -54,10 +64,22 @@ { [super viewDidLoad]; + // Register first customized cell view classes used to render bubbles + [self.bubblesTableView registerClass:RoomIncomingTextMsgWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomIncomingTextMsgWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomIncomingAttachmentWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomIncomingAttachmentWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + + [self.bubblesTableView registerClass:RoomOutgoingAttachmentBubbleCell.class forCellReuseIdentifier:RoomOutgoingAttachmentBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomOutgoingAttachmentWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomOutgoingAttachmentWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomOutgoingTextMsgBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [self.bubblesTableView registerClass:RoomOutgoingTextMsgWithPaginationTitleBubbleCell.class forCellReuseIdentifier:RoomOutgoingTextMsgWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + // Set room title view [self setRoomTitleViewClass:RoomTitleViewWithTopic.class]; // Replace the default input toolbar view. + // Note: this operation will force the layout of subviews. That is why cell view classes must be registered before. [self setRoomInputToolbarViewClass:RoomInputToolbarView.class]; [self roomInputToolbarView:self.inputToolbarView heightDidChanged:((RoomInputToolbarView*)self.inputToolbarView).mainToolbarHeightConstraint.constant completion:nil]; @@ -212,6 +234,90 @@ [super destroy]; } +#pragma mark - MXKDataSourceDelegate + +- (Class)cellViewClassForCellData:(MXKCellData*)cellData +{ + Class cellViewClass = nil; + + // Sanity check + if ([cellData conformsToProtocol:@protocol(MXKRoomBubbleCellDataStoring)]) + { + id bubbleData = (id)cellData; + + // Select the suitable table view cell class + if (bubbleData.isIncoming) + { + if (bubbleData.isAttachmentWithThumbnail) + { + if (bubbleData.isPaginationFirstBubble) + { + cellViewClass = RoomIncomingAttachmentWithPaginationTitleBubbleCell.class; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellViewClass = MXKRoomIncomingAttachmentWithoutSenderInfoBubbleCell.class; + } + else + { + cellViewClass = MXKRoomIncomingAttachmentBubbleCell.class; + } + } + else + { + if (bubbleData.isPaginationFirstBubble) + { + cellViewClass = RoomIncomingTextMsgWithPaginationTitleBubbleCell.class; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellViewClass = MXKRoomIncomingTextMsgWithoutSenderInfoBubbleCell.class; + } + else + { + cellViewClass = MXKRoomIncomingTextMsgBubbleCell.class; + } + } + } + else + { + // Handle here outgoing bubbles + if (bubbleData.isAttachmentWithThumbnail) + { + if (bubbleData.isPaginationFirstBubble) + { + cellViewClass = RoomOutgoingAttachmentWithPaginationTitleBubbleCell.class; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellViewClass = RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.class; + } + else + { + cellViewClass = RoomOutgoingAttachmentBubbleCell.class; + } + } + else + { + if (bubbleData.isPaginationFirstBubble) + { + cellViewClass = RoomOutgoingTextMsgWithPaginationTitleBubbleCell.class; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellViewClass = RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.class; + } + else + { + cellViewClass = RoomOutgoingTextMsgBubbleCell.class; + } + } + } + } + + return cellViewClass; +} + #pragma mark - MXKDataSource delegate - (void)dataSource:(MXKDataSource *)dataSource didRecognizeAction:(NSString *)actionIdentifier inCell:(id)cell userInfo:(NSDictionary *)userInfo diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.h b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.h similarity index 65% rename from Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.h rename to Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.h index 8b3c8344e..4844d96cd 100644 --- a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.h +++ b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.h @@ -14,18 +14,14 @@ limitations under the License. */ -#import +#import "MXKRoomIncomingAttachmentBubbleCell.h" /** - `RoomOutgoingBubbleTableViewCell` displays outgoing message bubbles. + `RoomIncomingAttachmentWithPaginationTitleBubbleCell` displays incoming attachment bubbles with sender's information and a pagination title. */ -@interface RoomOutgoingBubbleTableViewCell : MXKRoomOutgoingBubbleTableViewCell - -// FIXME GFO -@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator; +@interface RoomIncomingAttachmentWithPaginationTitleBubbleCell : MXKRoomIncomingAttachmentBubbleCell @property (weak, nonatomic) IBOutlet UIView *paginationTitleView; @property (weak, nonatomic) IBOutlet UILabel *paginationLabel; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint *paginationTitleViewHeightConstraint; @end diff --git a/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m new file mode 100644 index 000000000..479b542d5 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.m @@ -0,0 +1,21 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomIncomingAttachmentWithPaginationTitleBubbleCell.h" + +@implementation RoomIncomingAttachmentWithPaginationTitleBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib new file mode 100644 index 000000000..445f2ba6e --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.m b/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.m deleted file mode 100644 index f1c97390a..000000000 --- a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.m +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright 2015 OpenMarket Ltd - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "RoomIncomingBubbleTableViewCell.h" - -@interface RoomIncomingBubbleTableViewCell () -{ - BOOL showBubbleDateTimeFlag; -} - -@end - -@implementation RoomIncomingBubbleTableViewCell - -- (void)awakeFromNib -{ - [super awakeFromNib]; -} - -- (void)dealloc -{ -// [self stopTypingIndicatorAnimating]; -} - -- (void)setAllTextHighlighted:(BOOL)allTextHighlighted -{ - if (allTextHighlighted) - { - // Hide timestamp during selection - self.bubbleData.showBubbleDateTime = NO; - } - else - { - // Restore the actual value of the showBubbleDateTime flag - self.bubbleData.showBubbleDateTime = showBubbleDateTimeFlag; - } - - super.allTextHighlighted = allTextHighlighted; -} - -- (void)render:(MXKCellData *)cellData -{ - [super render:cellData]; - - if (self.bubbleData) - { - showBubbleDateTimeFlag = self.bubbleData.showBubbleDateTime; - - // Check whether a new pagination start at this bubble - if (self.bubbleData.isPaginationFirstBubble) - { - self.paginationTitleViewHeightConstraint.constant = 20; - self.paginationLabel.text = [self.bubbleData.eventFormatter dateStringFromDate:self.bubbleData.date withTime:NO]; - } - else - { - self.paginationTitleViewHeightConstraint.constant = 0; - } - - // FIXME remove this temporary code - if (self.attachmentView && self.bubbleData.isAttachmentWithThumbnail) - { - self.attachmentView.hidden = NO; - self.messageTextView.hidden = YES; - } - else - { - self.attachmentView.hidden = YES; - self.messageTextView.hidden = NO; - } - - - // TODO handle here pagination display per day - - // TODO handle here typing indicator - } -} - -- (void)didEndDisplay -{ - [super didEndDisplay]; - - // Stop potential typing indicator -// [self stopTypingIndicatorAnimating]; -} - -+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth -{ - CGFloat rowHeight = [super heightForCellData:cellData withMaximumWidth:maxWidth]; - - MXKRoomBubbleCellData *bubbleData = (MXKRoomBubbleCellData*)cellData; - - // Check whether a new pagination start at this bubble - // The pagination label is displayed with the first bubble of the pagination - if (bubbleData.isPaginationFirstBubble) - { - rowHeight += 20; - } - - return rowHeight; -} - -@end diff --git a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.h b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.h similarity index 72% rename from Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.h rename to Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.h index 5904af1da..e30efa145 100644 --- a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.h +++ b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.h @@ -14,15 +14,14 @@ limitations under the License. */ -#import +#import "MXKRoomIncomingTextMsgBubbleCell.h" /** - `RoomIncomingBubbleTableViewCell` displays incoming message bubbles. + `RoomIncomingTextMsgWithPaginationTitleBubbleCell` displays incoming message bubbles with sender's information. */ -@interface RoomIncomingBubbleTableViewCell : MXKRoomIncomingBubbleTableViewCell +@interface RoomIncomingTextMsgWithPaginationTitleBubbleCell : MXKRoomIncomingTextMsgBubbleCell @property (weak, nonatomic) IBOutlet UIView *paginationTitleView; @property (weak, nonatomic) IBOutlet UILabel *paginationLabel; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint *paginationTitleViewHeightConstraint; @end diff --git a/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m new file mode 100644 index 000000000..d7f0cc9ba --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.m @@ -0,0 +1,21 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomIncomingTextMsgWithPaginationTitleBubbleCell.h" + +@implementation RoomIncomingTextMsgWithPaginationTitleBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib new file mode 100644 index 000000000..c2eb30f90 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomIncomingTextMsgWithPaginationTitleBubbleCell.xib @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.h new file mode 100644 index 000000000..f28f564aa --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.h @@ -0,0 +1,24 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "MXKRoomOutgoingAttachmentBubbleCell.h" + +/** + `RoomOutgoingAttachmentBubbleCell` displays outgoing attachment bubbles. + */ +@interface RoomOutgoingAttachmentBubbleCell : MXKRoomOutgoingAttachmentBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.m new file mode 100644 index 000000000..1abacf321 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.m @@ -0,0 +1,31 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingAttachmentBubbleCell.h" + +@implementation RoomOutgoingAttachmentBubbleCell + +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; +} + +- (void)didEndDisplay +{ + [super didEndDisplay]; +} + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.xib similarity index 67% rename from Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.xib rename to Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.xib index 946366d53..d4469865a 100644 --- a/Vector/Views/RoomBubbleList/RoomIncomingBubbleTableViewCell.xib +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentBubbleCell.xib @@ -7,34 +7,13 @@ - + - - - - - - - - - - - - - - - @@ -45,7 +24,7 @@ - - - - - - - - - - - - + + - - + + + + - - - - - - - - - + + + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h new file mode 100644 index 000000000..0777a4140 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h @@ -0,0 +1,27 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingAttachmentBubbleCell.h" + +/** + `RoomOutgoingAttachmentWithPaginationTitleBubbleCell` displays outgoing attachment bubbles and pagination title. + */ +@interface RoomOutgoingAttachmentWithPaginationTitleBubbleCell : RoomOutgoingAttachmentBubbleCell + +@property (weak, nonatomic) IBOutlet UIView *paginationTitleView; +@property (weak, nonatomic) IBOutlet UILabel *paginationLabel; + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m new file mode 100644 index 000000000..0cd9c6299 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.m @@ -0,0 +1,31 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingAttachmentWithPaginationTitleBubbleCell.h" + +@implementation RoomOutgoingAttachmentWithPaginationTitleBubbleCell + +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; + + if (self.bubbleData) + { + self.paginationLabel.text = [self.bubbleData.eventFormatter dateStringFromDate:self.bubbleData.date withTime:NO]; + } +} + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib similarity index 67% rename from Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.xib rename to Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib index 3c88add2a..a6b82e0cf 100644 --- a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.xib +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib @@ -3,22 +3,23 @@ + - - + + - + - - + + - - + @@ -45,7 +46,7 @@ - - - - - - - - - - - - - - - - - - + - - + - - - + + + + - - - - - - - - - + + + + + - + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h new file mode 100644 index 000000000..980318e59 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h @@ -0,0 +1,24 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "MXKRoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h" + +/** + `RoomOutgoingAttachmentWithoutSenderInfoBubbleCell` displays outgoing attachment with thumbnail, without user's name. + */ +@interface RoomOutgoingAttachmentWithoutSenderInfoBubbleCell : MXKRoomOutgoingAttachmentWithoutSenderInfoBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m new file mode 100644 index 000000000..f1bccf327 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.m @@ -0,0 +1,21 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.h" + +@implementation RoomOutgoingAttachmentWithoutSenderInfoBubbleCell + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib new file mode 100644 index 000000000..951122e86 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.m deleted file mode 100644 index 3b4f9b821..000000000 --- a/Vector/Views/RoomBubbleList/RoomOutgoingBubbleTableViewCell.m +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright 2015 OpenMarket Ltd - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -#import "RoomOutgoingBubbleTableViewCell.h" - -#pragma mark - UI Constant definitions -#define MXKROOMBUBBLETABLEVIEWCELL_OUTGOING_HEIGHT_REDUCTION_WHEN_SENDER_INFO_IS_HIDDEN -10 - -@interface RoomOutgoingBubbleTableViewCell () -{ - BOOL showBubbleDateTimeFlag; -} - -@end - -@implementation RoomOutgoingBubbleTableViewCell - -- (void)setAllTextHighlighted:(BOOL)allTextHighlighted -{ - if (allTextHighlighted) - { - // Hide timestamp during selection - self.bubbleData.showBubbleDateTime = NO; - } - else - { - // Restore the actual value of the showBubbleDateTime flag - self.bubbleData.showBubbleDateTime = showBubbleDateTimeFlag; - } - - super.allTextHighlighted = allTextHighlighted; -} - -- (void)render:(MXKCellData *)cellData -{ - [super render:cellData]; - - if (self.bubbleData) - { - showBubbleDateTimeFlag = self.bubbleData.showBubbleDateTime; - - // Check whether a new pagination start at this bubble - if (self.bubbleData.isPaginationFirstBubble) - { - self.paginationTitleViewHeightConstraint.constant = 20; - self.paginationLabel.text = [self.bubbleData.eventFormatter dateStringFromDate:self.bubbleData.date withTime:NO]; - } - else - { - self.paginationTitleViewHeightConstraint.constant = 0; - } - - // FIXME remove this temporary code - if (self.attachmentView && self.bubbleData.isAttachmentWithThumbnail) - { - self.attachmentView.hidden = NO; - self.messageTextView.hidden = YES; - } - else - { - self.attachmentView.hidden = YES; - self.messageTextView.hidden = NO; - } - - - // TODO handle here unsent - - // Add unsent label for failed components -// for (MXKRoomBubbleComponent *component in self.bubbleData.bubbleComponents) -// { -// if (component.event.mxkState == MXKEventStateSendingFailed) -// { -// UIButton *unsentButton = [[UIButton alloc] initWithFrame:CGRectMake(0, component.position.y, 58 , 20)]; -// -// [unsentButton setTitle:[NSBundle mxk_localizedStringForKey:@"unsent"] forState:UIControlStateNormal]; -// [unsentButton setTitle:[NSBundle mxk_localizedStringForKey:@"unsent"] forState:UIControlStateSelected]; -// [unsentButton setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; -// [unsentButton setTitleColor:[UIColor redColor] forState:UIControlStateSelected]; -// -// unsentButton.backgroundColor = [UIColor whiteColor]; -// unsentButton.titleLabel.font = [UIFont systemFontOfSize:14]; -// -// [unsentButton addTarget:self action:@selector(onResendToggle:) forControlEvents:UIControlEventTouchUpInside]; -// -// [self.dateTimeLabelContainer addSubview:unsentButton]; -// self.dateTimeLabelContainer.hidden = NO; -// self.dateTimeLabelContainer.userInteractionEnabled = YES; -// -// // ensure that dateTimeLabelContainer is at front to catch the tap event -// [self.dateTimeLabelContainer.superview bringSubviewToFront:self.dateTimeLabelContainer]; -// } -// } - } -} - -+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth -{ - CGFloat rowHeight = [super heightForCellData:cellData withMaximumWidth:maxWidth]; - - MXKRoomBubbleCellData *bubbleData = (MXKRoomBubbleCellData*)cellData; - - // Check whether a new pagination start at this bubble - // The pagination label is displayed with the first bubble of the pagination - if (bubbleData.isPaginationFirstBubble) - { - rowHeight += 20; - } - - return rowHeight; -} - -@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.h new file mode 100644 index 000000000..ec09deecf --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.h @@ -0,0 +1,24 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "MXKRoomOutgoingTextMsgBubbleCell.h" + +/** + `RoomOutgoingTextMsgBubbleCell` displays outgoing message bubbles with user's picture. + */ +@interface RoomOutgoingTextMsgBubbleCell : MXKRoomOutgoingTextMsgBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.m new file mode 100644 index 000000000..9cb6bd59a --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.m @@ -0,0 +1,21 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingTextMsgBubbleCell.h" + +@implementation RoomOutgoingTextMsgBubbleCell + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.xib new file mode 100644 index 000000000..04d93d135 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgBubbleCell.xib @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h new file mode 100644 index 000000000..75802d3de --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h @@ -0,0 +1,27 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingTextMsgBubbleCell.h" + +/** + `RoomOutgoingTextMsgWithPaginationTitleBubbleCell` displays outgoing message bubbles with user's picture and pagination title. + */ +@interface RoomOutgoingTextMsgWithPaginationTitleBubbleCell : RoomOutgoingTextMsgBubbleCell + +@property (weak, nonatomic) IBOutlet UIView *paginationTitleView; +@property (weak, nonatomic) IBOutlet UILabel *paginationLabel; + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m new file mode 100644 index 000000000..507285c48 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.m @@ -0,0 +1,31 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingTextMsgWithPaginationTitleBubbleCell.h" + +@implementation RoomOutgoingTextMsgWithPaginationTitleBubbleCell + +- (void)render:(MXKCellData *)cellData +{ + [super render:cellData]; + + if (self.bubbleData) + { + self.paginationLabel.text = [self.bubbleData.eventFormatter dateStringFromDate:self.bubbleData.date withTime:NO]; + } +} + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib new file mode 100644 index 000000000..aa95b1e74 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h new file mode 100644 index 000000000..b063e069d --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h @@ -0,0 +1,24 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "MXKRoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h" + +/** + `RoomOutgoingTextMsgWithoutSenderInfoBubbleCell` displays outgoing message bubbles without user's name. + */ +@interface RoomOutgoingTextMsgWithoutSenderInfoBubbleCell : MXKRoomOutgoingTextMsgWithoutSenderInfoBubbleCell + +@end diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m new file mode 100644 index 000000000..07fea8672 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.m @@ -0,0 +1,21 @@ +/* + Copyright 2015 OpenMarket Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.h" + +@implementation RoomOutgoingTextMsgWithoutSenderInfoBubbleCell + +@end \ No newline at end of file diff --git a/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib new file mode 100644 index 000000000..db1cc9042 --- /dev/null +++ b/Vector/Views/RoomBubbleList/RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Vector/Views/RoomList/RecentTableViewCell.m b/Vector/Views/RoomList/RecentTableViewCell.m index 390b0aae2..c0395d837 100644 --- a/Vector/Views/RoomList/RecentTableViewCell.m +++ b/Vector/Views/RoomList/RecentTableViewCell.m @@ -115,9 +115,6 @@ } } - - - + (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth { // The height is fixed