mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 14:24:05 +01:00
Crashing bug fixes
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
60d19bc658
commit
60d329b8b1
@ -228,7 +228,9 @@ public class BrowserController extends BaseController implements ListingInterfac
|
||||
|
||||
currentPath = objectList.get(0).getPath();
|
||||
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(this::setTitle);
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> setTitle());
|
||||
}
|
||||
|
||||
for (int i = 1; i < objectList.size(); i++) {
|
||||
fileBrowserItems.add(new BrowserFileItem(objectList.get(i), activeUser, this));
|
||||
@ -236,10 +238,14 @@ public class BrowserController extends BaseController implements ListingInterfac
|
||||
}
|
||||
|
||||
adapter.addItems(0, fileBrowserItems);
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(() -> {
|
||||
adapter.notifyDataSetChanged();
|
||||
changeEnabledStatusForBarItems(true);
|
||||
});
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
adapter.notifyDataSetChanged();
|
||||
changeEnabledStatusForBarItems(true);
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldPathBeSelectedDueToParent(String currentPath) {
|
||||
|
@ -1019,15 +1019,19 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
||||
newMessagesCount = 0;
|
||||
}
|
||||
|
||||
chatMessage.setGrouped(adapter.isPreviousSameAuthor(chatMessage.getActorId(), -1) && (adapter.getSameAuthorLastMessagesCount(chatMessage.getActorId()) % 5) > 0);
|
||||
if (adapter != null) {
|
||||
chatMessage.setGrouped(adapter.isPreviousSameAuthor(chatMessage.getActorId(), -1) && (adapter.getSameAuthorLastMessagesCount(chatMessage.getActorId()) % 5) > 0);
|
||||
adapter.addToStart(chatMessage, shouldScroll);
|
||||
}
|
||||
|
||||
adapter.addToStart(chatMessage, shouldScroll);
|
||||
}
|
||||
|
||||
String xChatLastGivenHeader;
|
||||
if (response.headers().size() > 0 && !TextUtils.isEmpty((xChatLastGivenHeader = response.headers().get
|
||||
("X-Chat-Last-Given")))) {
|
||||
globalLastKnownFutureMessageId = Integer.parseInt(xChatLastGivenHeader);
|
||||
if (xChatLastGivenHeader != null) {
|
||||
globalLastKnownFutureMessageId = Integer.parseInt(xChatLastGivenHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user