mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Fixes
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
f862f7ff8f
commit
a299a230c6
@ -99,7 +99,6 @@ public class MagicCallActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
|
||||||
eventBus.post(new ConfigurationChangeEvent());
|
eventBus.post(new ConfigurationChangeEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,8 +215,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|||||||
if (adapter == null) {
|
if (adapter == null) {
|
||||||
adapter = new FlexibleAdapter<>(contactItems, getActivity(), false);
|
adapter = new FlexibleAdapter<>(contactItems, getActivity(), false);
|
||||||
|
|
||||||
currentUser = userUtils.getCurrentUser();
|
|
||||||
|
|
||||||
if (currentUser != null) {
|
if (currentUser != null) {
|
||||||
fetchData(true);
|
fetchData(true);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,6 @@ public class AccountRemovalWorker extends Worker {
|
|||||||
PushConfigurationState.class);
|
PushConfigurationState.class);
|
||||||
PushConfigurationState finalPushConfigurationState = pushConfigurationState;
|
PushConfigurationState finalPushConfigurationState = pushConfigurationState;
|
||||||
|
|
||||||
ApplicationWideApiHolder.getInstance().removeNcApiInstanceForAccountId(userEntity.getId());
|
|
||||||
ncApi = ApplicationWideApiHolder.getInstance().getNcApiInstanceForAccountId(userEntity.getId(), null);
|
ncApi = ApplicationWideApiHolder.getInstance().getNcApiInstanceForAccountId(userEntity.getId(), null);
|
||||||
credentials = ApiUtils.getCredentials(userEntity.getUserId(), userEntity.getToken());
|
credentials = ApiUtils.getCredentials(userEntity.getUserId(), userEntity.getToken());
|
||||||
|
|
||||||
@ -116,6 +115,9 @@ public class AccountRemovalWorker extends Worker {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(Void aVoid) {
|
public void onNext(Void aVoid) {
|
||||||
|
|
||||||
|
ApplicationWideApiHolder.getInstance().removeNcApiInstanceForAccountId(userEntity.getId());
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
String groupName = String.format(getApplicationContext().getResources()
|
String groupName = String.format(getApplicationContext().getResources()
|
||||||
.getString(R.string
|
.getString(R.string
|
||||||
@ -140,6 +142,7 @@ public class AccountRemovalWorker extends Worker {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -267,8 +267,7 @@ public class PushUtils {
|
|||||||
ncApi.registerDeviceForNotificationsWithNextcloud(
|
ncApi.registerDeviceForNotificationsWithNextcloud(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl()), queryMap)
|
ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl()), queryMap)
|
||||||
.subscribeOn(Schedulers.newThread())
|
.blockingSubscribe(new Observer<PushRegistrationOverall>() {
|
||||||
.subscribe(new Observer<PushRegistrationOverall>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
@ -289,7 +288,7 @@ public class PushUtils {
|
|||||||
ncApi.registerDeviceForNotificationsWithProxy(finalCredentials,
|
ncApi.registerDeviceForNotificationsWithProxy(finalCredentials,
|
||||||
ApiUtils.getUrlPushProxy(), proxyMap)
|
ApiUtils.getUrlPushProxy(), proxyMap)
|
||||||
.subscribeOn(Schedulers.newThread())
|
.subscribeOn(Schedulers.newThread())
|
||||||
.subscribe(new Observer<Void>() {
|
.blockingSubscribe(new Observer<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
@ -317,7 +316,7 @@ public class PushUtils {
|
|||||||
userEntity.getDisplayName(),
|
userEntity.getDisplayName(),
|
||||||
LoganSquare.serialize(pushConfigurationState), null,
|
LoganSquare.serialize(pushConfigurationState), null,
|
||||||
null, userEntity.getId(), null, null)
|
null, userEntity.getId(), null, null)
|
||||||
.subscribe(new Observer<UserEntity>() {
|
.blockingSubscribe(new Observer<UserEntity>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
@ -49,9 +49,8 @@ public class UserUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List getUsers() {
|
public List getUsers() {
|
||||||
Result findUsersQueryResult = dataStore.select(User.class).where(UserEntity.SCHEDULED_FOR_DELETION.notEqual
|
Result findUsersQueryResult = dataStore.select(User.class).where
|
||||||
(true))
|
(UserEntity.SCHEDULED_FOR_DELETION.notEqual(true)).get();
|
||||||
.get();
|
|
||||||
|
|
||||||
return findUsersQueryResult.toList();
|
return findUsersQueryResult.toList();
|
||||||
}
|
}
|
||||||
@ -109,8 +108,7 @@ public class UserUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UserEntity getUserWithId(long id) {
|
public UserEntity getUserWithId(long id) {
|
||||||
Result findUserQueryResult = dataStore.select(User.class).where(UserEntity.ID.eq(id)
|
Result findUserQueryResult = dataStore.select(User.class).where(UserEntity.ID.eq(id))
|
||||||
.and(UserEntity.SCHEDULED_FOR_DELETION.notEqual(true)))
|
|
||||||
.limit(1).get();
|
.limit(1).get();
|
||||||
|
|
||||||
return (UserEntity) findUserQueryResult.firstOrNull();
|
return (UserEntity) findUserQueryResult.firstOrNull();
|
||||||
|
Loading…
Reference in New Issue
Block a user