clean up unused code

pull/541/head
Ryan Zhao 2 years ago
parent 7a677a1800
commit c85e3ef86b

@ -591,11 +591,6 @@ extension ConversationVC : InputViewDelegate, MessageCellDelegate, ContextMenuAc
}
func delete(_ viewItem: ConversationViewItem) {
if (!self.isUnsendRequestsEnabled) {
viewItem.deleteAction()
return
}
guard let message = viewItem.interaction as? TSMessage else { return self.deleteLocally(viewItem) }
// Handle open group messages the old way

@ -5,7 +5,6 @@
// Remaining search glitchiness
final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversationSettingsViewDelegate, ConversationSearchControllerDelegate, UITableViewDataSource, UITableViewDelegate {
let isUnsendRequestsEnabled = true // Set to true once unsend requests are done on all platforms
let thread: TSThread
let focusedMessageID: String? // This is used for global search
var focusedMessageIndexPath: IndexPath?

@ -122,8 +122,6 @@ static const int kYapDatabaseRangeMaxLength = 250000;
- (void)ensureDynamicInteractionsAndUpdateIfNecessary:(BOOL)updateIfNecessary;
- (void)clearUnreadMessagesIndicator;
- (void)loadAnotherPageOfMessages;
- (void)viewDidResetContentAndLayout;

@ -517,37 +517,6 @@ NS_ASSUME_NONNULL_BEGIN
}
}
- (void)clearUnreadMessagesIndicator
{
OWSAssertIsOnMainThread();
// TODO: Remove by making unread indicator a view model concern.
id<ConversationViewItem> _Nullable oldIndicatorItem = [self.viewState unreadIndicatorViewItem];
if (oldIndicatorItem) {
// TODO ideally this would be happening within the *same* transaction that caused the unreadMessageIndicator
// to be cleared.
[LKStorage writeWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[oldIndicatorItem.interaction touchWithTransaction:transaction];
}];
}
if (self.hasClearedUnreadMessagesIndicator) {
// ensureDynamicInteractionsForThread is somewhat expensive
// so we don't want to call it unnecessarily.
return;
}
// Once we've cleared the unread messages indicator,
// make sure we don't show it again.
self.hasClearedUnreadMessagesIndicator = YES;
if (self.dynamicInteractions.unreadIndicator) {
// If we've just cleared the "unread messages" indicator,
// update the dynamic interactions.
[self ensureDynamicInteractionsAndUpdateIfNecessary:YES];
}
}
#pragma mark - Storage access
- (void)uiDatabaseDidUpdateExternally:(NSNotification *)notification

Loading…
Cancel
Save