Skip to content

Commit da2e2a9

Browse files
committed
Remove outdated stableId pattern from ConversationAdapter.
1 parent 0c00426 commit da2e2a9

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationAdapter.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ public class ConversationAdapter
102102

103103
private static final int PAYLOAD_TIMESTAMP = 0;
104104

105-
private static final long HEADER_ID = Long.MIN_VALUE;
106-
private static final long FOOTER_ID = Long.MIN_VALUE + 1;
107-
108105
private final ItemClickListener clickListener;
109106
private final Context context;
110107
private final LifecycleOwner lifecycleOwner;
@@ -163,8 +160,6 @@ public boolean areContentsTheSame(@NonNull ConversationMessage oldItem, @NonNull
163160
this.hasWallpaper = recipient.hasWallpaper();
164161
this.isMessageRequestAccepted = true;
165162
this.colorizer = colorizer;
166-
167-
setHasStableIds(true);
168163
}
169164

170165
@Override
@@ -191,25 +186,6 @@ public int getItemViewType(int position) {
191186
}
192187
}
193188

194-
@Override
195-
public long getItemId(int position) {
196-
if (hasHeader() && position == 0) {
197-
return HEADER_ID;
198-
}
199-
200-
if (hasFooter() && position == getItemCount() - 1) {
201-
return FOOTER_ID;
202-
}
203-
204-
ConversationMessage message = getItem(position);
205-
206-
if (message == null) {
207-
return -1;
208-
}
209-
210-
return message.getUniqueId(digest);
211-
}
212-
213189
@SuppressLint("ClickableViewAccessibility")
214190
@Override
215191
public @NonNull RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {

0 commit comments

Comments
 (0)