mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-20 14:17:46 +00:00
Implement hasCode based on equals() elements to fullfil hasCode/equals contract
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
35fec87aaa
commit
ae6b7156c0
@ -30,6 +30,7 @@ import com.nextcloud.talk.databinding.RvItemTitleHeaderBinding;
|
||||
import com.nextcloud.talk.ui.theme.ViewThemeUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter;
|
||||
import eu.davidea.flexibleadapter.items.AbstractHeaderItem;
|
||||
@ -63,6 +64,11 @@ public class GenericTextHeaderItem extends AbstractHeaderItem<GenericTextHeaderI
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutRes() {
|
||||
return R.layout.rv_item_title_header;
|
||||
|
@ -39,6 +39,7 @@ import com.nextcloud.talk.ui.theme.ViewThemeUtils;
|
||||
import com.nextcloud.talk.utils.DisplayUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
@ -108,6 +109,11 @@ public class MentionAutocompleteItem extends AbstractFlexibleItem<ParticipantIte
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(objectId, displayName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutRes() {
|
||||
return R.layout.rv_item_conversation_info_participant;
|
||||
|
Loading…
Reference in New Issue
Block a user