From 748b9ee9db375ceea904c662116eb1dc14599a9f Mon Sep 17 00:00:00 2001 From: Mohammed Abid Nafi Date: Thu, 3 Jun 2021 02:02:55 +0530 Subject: [PATCH] Removed Imple of Read Reciepts --- .../java/com/margsapp/messenger/Adapter/MessageAdapter.java | 6 +++--- .../java/com/margsapp/messenger/Main/MessageActivity.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java b/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java index 368aa21..e7a5c2b 100644 --- a/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java +++ b/app/src/main/java/com/margsapp/messenger/Adapter/MessageAdapter.java @@ -42,16 +42,16 @@ public class MessageAdapter extends RecyclerView.Adapter mChat, String imageUrl,SharedPreferences sharedPreferences) { + + public MessageAdapter(Context mContext, List mChat, String imageUrl) { this.mContext = mContext; this.mChat = mChat; this.imageUrl = imageUrl; - this.sharedPreferences = sharedPreferences; + } diff --git a/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java b/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java index 11ac77e..726d1fe 100644 --- a/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java +++ b/app/src/main/java/com/margsapp/messenger/Main/MessageActivity.java @@ -819,7 +819,6 @@ public void onCancelled(@NonNull DatabaseError error) { private void readMessage(String myid, String userid, String imageUrl){ mchat = new ArrayList<>(); - SharedPreferences sharedPreferences = getSharedPreferences("ReadRecipents", 0); databaseReference = FirebaseDatabase.getInstance().getReference("Chats"); databaseReference.keepSynced(true); databaseReference.addValueEventListener(new ValueEventListener() { @@ -837,7 +836,7 @@ public void onDataChange(@NonNull DataSnapshot snapshot) { - messageAdapter = new MessageAdapter(MessageActivity.this, mchat, imageUrl,sharedPreferences); + messageAdapter = new MessageAdapter(MessageActivity.this, mchat, imageUrl); recyclerView.setAdapter(messageAdapter);