Skip to content

Вторая работа, ПР#1

Open
qu1eres wants to merge 3 commits intomainfrom
dev
Open

Вторая работа, ПР#1
qu1eres wants to merge 3 commits intomainfrom
dev

Conversation

@qu1eres
Copy link
Owner

@qu1eres qu1eres commented Jan 26, 2025

Перед созданием ПРа проверил работоспособность фильтров приложения


@Override
public boolean areContentsTheSame(@NonNull T oldItem, @NonNull T newItem) {
return false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В этом методе нужно сравнить содержимое двух объектов с помощью функции equals, которая определена в интерфейсе ListDiffInterface

Copy link
Owner Author

@qu1eres qu1eres Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Залил коммит с изменениями


public interface ListDiffInterface<T> {
boolean theSameAs(T t);
boolean equals(Object object);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы явно было видно, что это именно переопределение функции класса Object, лучше дописать к этой функции аннотацию @Overrides

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Залил коммит с исправлениями в ПР

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants