From db32dcc6a2ea5f93102f7771da99bf917452932e Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 2 Jul 2018 15:49:35 -0400 Subject: [PATCH] Cleanup. --- .../Cells/OWSContactOffersCell.m | 1 - .../Cells/OWSMessageBubbleView.m | 2 -- .../ConversationView/ConversationViewItem.m | 22 ------------------- .../ConversationView/ConversationViewLayout.h | 11 ---------- 4 files changed, 36 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m index ae4972bf6..7f773f7db 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m @@ -136,7 +136,6 @@ NS_ASSUME_NONNULL_BEGIN [self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:self.topVMargin], [self.stackView autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:self.bottomVMargin], - // TODO: Honor "full-width gutters"? [self.stackView autoPinEdgeToSuperviewEdge:ALEdgeLeading withInset:self.conversationStyle.fullWidthGutterLeading], [self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTrailing diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m index 5b51b8689..43edf3f85 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m @@ -415,7 +415,6 @@ NS_ASSUME_NONNULL_BEGIN [self configureBodyTextView]; [textViews addObject:self.bodyTextView]; - // TODO: Media? OWSAssert(bodyTextSize); [self.viewConstraints addObjectsFromArray:@[ [self.bodyTextView autoSetDimension:ALDimensionHeight toSize:bodyTextSize.CGSizeValue.height], @@ -554,7 +553,6 @@ NS_ASSUME_NONNULL_BEGIN UIStackView *textStackView = [[UIStackView alloc] initWithArrangedSubviews:textViews]; textStackView.axis = UILayoutConstraintAxisVertical; - // TODO: Review textStackView.spacing = self.textViewVSpacing; textStackView.layoutMarginsRelativeArrangement = YES; textStackView.layoutMargins = UIEdgeInsetsMake(self.conversationStyle.textInsetTop, diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m index 4daddfa25..810a4ea49 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m @@ -204,28 +204,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) return [self.cachedCellSize CGSizeValue]; } -- (ConversationViewLayoutAlignment)layoutAlignment -{ - switch (self.interaction.interactionType) { - case OWSInteractionType_Unknown: - DDLogVerbose(@"%@ Unknown interaction type: %@", self.logTag, self.interaction.debugDescription); - OWSFail(@"%@ Unknown interaction type", self.logTag); - return ConversationViewLayoutAlignment_Center; - case OWSInteractionType_IncomingMessage: - return ConversationViewLayoutAlignment_Incoming; - case OWSInteractionType_OutgoingMessage: - return ConversationViewLayoutAlignment_Outgoing; - case OWSInteractionType_Error: - case OWSInteractionType_Info: - case OWSInteractionType_Call: - return ConversationViewLayoutAlignment_Center; - case OWSInteractionType_UnreadIndicator: - return ConversationViewLayoutAlignment_FullWidth; - case OWSInteractionType_Offer: - return ConversationViewLayoutAlignment_Center; - } -} - - (nullable ConversationViewCell *)measurementCell { OWSAssertIsOnMainThread(); diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewLayout.h b/Signal/src/ViewControllers/ConversationView/ConversationViewLayout.h index 5f81c9c37..ddffd0e57 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewLayout.h +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewLayout.h @@ -4,15 +4,6 @@ NS_ASSUME_NONNULL_BEGIN -// TODO: Remove this enum. -typedef NS_ENUM(NSInteger, ConversationViewLayoutAlignment) { - // We use incoming/outgoing, not left/right to support RTL. - ConversationViewLayoutAlignment_Incoming, - ConversationViewLayoutAlignment_Outgoing, - ConversationViewLayoutAlignment_FullWidth, - ConversationViewLayoutAlignment_Center, -}; - @class ConversationStyle; @class YapDatabaseConnection; @class YapDatabaseReadTransaction; @@ -21,8 +12,6 @@ typedef NS_ENUM(NSInteger, ConversationViewLayoutAlignment) { - (CGSize)cellSizeWithTransaction:(YapDatabaseReadTransaction *)transaction; -- (ConversationViewLayoutAlignment)layoutAlignment; - - (CGFloat)vSpacingWithPreviousLayoutItem:(id)previousLayoutItem; @end