mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-04-28 17:00:27 -05:00
bugfixes
This commit is contained in:
@@ -189,7 +189,7 @@ public class MessagesListAdapter<MESSAGE extends IMessage>
|
||||
* @param reverse {@code true} if need to reverse messages before adding.
|
||||
*/
|
||||
public void addToEnd(List<MESSAGE> messages, boolean reverse) {
|
||||
if (messages.isEmpty()) return;
|
||||
if (messages == null || messages.isEmpty()) return;
|
||||
|
||||
if (reverse) Collections.reverse(messages);
|
||||
|
||||
@@ -383,7 +383,7 @@ public class MessagesListAdapter<MESSAGE extends IMessage>
|
||||
}
|
||||
|
||||
public void scrollToPosition(int position) {
|
||||
if (layoutManager != null && !items.isEmpty()) {
|
||||
if (position != -1 && layoutManager != null && !items.isEmpty()) {
|
||||
layoutManager.scrollToPosition(position);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user