mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-02 17:45:21 +01:00
Fix a few bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
e35cfe90e7
commit
0430796c21
@ -110,11 +110,9 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
public static final String TAG = "ContactsController";
|
public static final String TAG = "ContactsController";
|
||||||
|
|
||||||
private static final String KEY_SEARCH_QUERY = "ContactsController.searchQuery";
|
private static final String KEY_SEARCH_QUERY = "ContactsController.searchQuery";
|
||||||
@BindView(R.id.call_header_layout)
|
@Nullable @BindView(R.id.call_header_layout)
|
||||||
public RelativeLayout callHeaderLayout;
|
|
||||||
@BindView(R.id.initial_relative_layout)
|
|
||||||
public RelativeLayout initialRelativeLayout;
|
public RelativeLayout initialRelativeLayout;
|
||||||
@BindView(R.id.secondary_relative_layout)
|
@Nullable @BindView(R.id.secondary_relative_layout)
|
||||||
public RelativeLayout secondaryRelativeLayout;
|
public RelativeLayout secondaryRelativeLayout;
|
||||||
@Inject
|
@Inject
|
||||||
UserUtils userUtils;
|
UserUtils userUtils;
|
||||||
@ -172,7 +170,11 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
|
protected View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
|
||||||
return inflater.inflate(R.layout.controller_contacts_rv, container, false);
|
if (isNewConversationView) {
|
||||||
|
return inflater.inflate(R.layout.controller_contacts_rv, container, false);
|
||||||
|
} else {
|
||||||
|
return inflater.inflate(R.layout.controller_generic_rv, container, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -467,12 +469,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
return firstName.compareToIgnoreCase(secondName);
|
return firstName.compareToIgnoreCase(secondName);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isNewConversationView) {
|
|
||||||
callHeaderLayout.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
callHeaderLayout.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
adapter.updateDataSet(contactItems, true);
|
adapter.updateDataSet(contactItems, true);
|
||||||
searchItem.setVisible(contactItems.size() > 0);
|
searchItem.setVisible(contactItems.size() > 0);
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
@ -751,7 +747,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick(R.id.call_header_layout)
|
@Optional @OnClick(R.id.call_header_layout)
|
||||||
void toggleCallHeader() {
|
void toggleCallHeader() {
|
||||||
adapter.toggleSelection(0);
|
adapter.toggleSelection(0);
|
||||||
isPublicCall = adapter.isSelected(0);
|
isPublicCall = adapter.isSelected(0);
|
||||||
|
@ -45,6 +45,7 @@ import autodagger.AutoInjector;
|
|||||||
import io.reactivex.CompletableObserver;
|
import io.reactivex.CompletableObserver;
|
||||||
import io.reactivex.Observer;
|
import io.reactivex.Observer;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
import io.reactivex.schedulers.Schedulers;
|
||||||
import okhttp3.JavaNetCookieJar;
|
import okhttp3.JavaNetCookieJar;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import retrofit2.Retrofit;
|
import retrofit2.Retrofit;
|
||||||
@ -83,6 +84,7 @@ public class AccountRemovalJob extends Job {
|
|||||||
|
|
||||||
ncApi.unregisterDeviceForNotificationsWithNextcloud(ApiUtils.getCredentials(userEntity.getUsername(),
|
ncApi.unregisterDeviceForNotificationsWithNextcloud(ApiUtils.getCredentials(userEntity.getUsername(),
|
||||||
userEntity.getToken()), ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl()))
|
userEntity.getToken()), ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl()))
|
||||||
|
.subscribeOn(Schedulers.newThread())
|
||||||
.subscribe(new Observer<GenericOverall>() {
|
.subscribe(new Observer<GenericOverall>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@ -102,6 +104,7 @@ public class AccountRemovalJob extends Job {
|
|||||||
ncApi.unregisterDeviceForNotificationsWithProxy
|
ncApi.unregisterDeviceForNotificationsWithProxy
|
||||||
(ApiUtils.getCredentials(userEntity.getUsername(),
|
(ApiUtils.getCredentials(userEntity.getUsername(),
|
||||||
userEntity.getToken()), ApiUtils.getUrlPushProxy(), queryMap)
|
userEntity.getToken()), ApiUtils.getUrlPushProxy(), queryMap)
|
||||||
|
.subscribeOn(Schedulers.newThread())
|
||||||
.subscribe(new Observer<Void>() {
|
.subscribe(new Observer<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
@ -154,7 +157,9 @@ public class AccountRemovalJob extends Job {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
userUtils.deleteUser(userEntity.getUsername(),
|
userUtils.deleteUser(userEntity.getUsername(),
|
||||||
userEntity.getBaseUrl()).subscribe(new CompletableObserver() {
|
userEntity.getBaseUrl())
|
||||||
|
.subscribeOn(Schedulers.newThread())
|
||||||
|
.subscribe(new CompletableObserver() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
@ -174,7 +179,9 @@ public class AccountRemovalJob extends Job {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.d(TAG, "Something went wrong while removing job at parsing PushConfigurationState");
|
Log.d(TAG, "Something went wrong while removing job at parsing PushConfigurationState");
|
||||||
userUtils.deleteUser(userEntity.getUsername(),
|
userUtils.deleteUser(userEntity.getUsername(),
|
||||||
userEntity.getBaseUrl()).subscribe(new CompletableObserver() {
|
userEntity.getBaseUrl())
|
||||||
|
.subscribeOn(Schedulers.newThread())
|
||||||
|
.subscribe(new CompletableObserver() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user