mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-13 15:54:59 +01:00
Fix code review
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
252d93503c
commit
a9f48ad4da
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
package com.nextcloud.talk.controllers;
|
package com.nextcloud.talk.controllers;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -161,18 +162,22 @@ public class ConversationInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setupAdapter() {
|
private void setupAdapter() {
|
||||||
if (adapter == null && getActivity() != null) {
|
Activity activity;
|
||||||
adapter = new FlexibleAdapter<>(recyclerViewItems, getActivity(), true);
|
|
||||||
|
if ((activity = getActivity()) != null) {
|
||||||
|
if (adapter == null) {
|
||||||
|
adapter = new FlexibleAdapter<>(recyclerViewItems, activity, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recyclerView != null && getActivity() != null) {
|
if (recyclerView != null) {
|
||||||
SmoothScrollLinearLayoutManager layoutManager =
|
SmoothScrollLinearLayoutManager layoutManager =
|
||||||
new SmoothScrollLinearLayoutManager(getActivity());
|
new SmoothScrollLinearLayoutManager(activity);
|
||||||
recyclerView.setLayoutManager(layoutManager);
|
recyclerView.setLayoutManager(layoutManager);
|
||||||
recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void handleParticipants(List<Participant> participants) {
|
private void handleParticipants(List<Participant> participants) {
|
||||||
UserItem userItem;
|
UserItem userItem;
|
||||||
|
Loading…
Reference in New Issue
Block a user