Fix #339 and update jobs

This commit is contained in:
Mario Danic 2018-11-02 03:53:23 +01:00
parent 28e62aba2e
commit 732a24692e
8 changed files with 43 additions and 3 deletions

View file

@ -93,7 +93,7 @@ android {
ext {
supportLibraryVersion = '28.0.0'
workVersion = "1.0.0-alpha09"
workVersion = "1.0.0-alpha10"
}
@ -155,8 +155,8 @@ dependencies {
compileOnly "org.projectlombok:lombok:1.18.2"
annotationProcessor "org.projectlombok:lombok:1.18.2"
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'
implementation 'com.jakewharton:butterknife:9.0.0-rc1'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
implementation 'com.github.HITGIF:TextFieldBoxes:1.4.3'

View file

@ -316,6 +316,10 @@ public class SettingsController extends BaseController {
dispose(null);
getCurrentUser();
if (shouldVibrateSwitchPreference.getVisibility() == View.VISIBLE) {
shouldVibrateSwitchPreference.setActivated(appPreferences.getShouldVibrateSetting());
}
if (!TextUtils.isEmpty(currentUser.getClientCertificate())) {
certificateSetup.setTitle(R.string.nc_client_cert_change);
} else {

View file

@ -47,6 +47,7 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import autodagger.AutoInjector;
import io.reactivex.CompletableObserver;
import io.reactivex.Observer;
@ -70,6 +71,10 @@ public class AccountRemovalWorker extends Worker {
NcApi ncApi;
public AccountRemovalWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@NonNull
@Override
public Result doWork() {

View file

@ -20,6 +20,7 @@
package com.nextcloud.talk.jobs;
import android.content.Context;
import android.util.Log;
import com.bluelinelabs.logansquare.LoganSquare;
@ -44,6 +45,7 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.work.Data;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import autodagger.AutoInjector;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
@ -69,6 +71,11 @@ public class CapabilitiesWorker extends Worker {
NcApi ncApi;
public CapabilitiesWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
private void updateUser(CapabilitiesOverall capabilitiesOverall, UserEntity internalUserEntity) {
try {
userUtils.createOrUpdateUser(null, null,

View file

@ -78,6 +78,7 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.work.Data;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import autodagger.AutoInjector;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
@ -107,6 +108,10 @@ public class NotificationWorker extends Worker {
private String credentials;
public NotificationWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
private void showNotificationForCallWithNoPing(Intent intent) {
UserEntity userEntity = signatureVerification.getUserEntity();
ncApi.getRoom(credentials, ApiUtils.getRoom(userEntity.getBaseUrl(),

View file

@ -20,14 +20,21 @@
package com.nextcloud.talk.jobs;
import android.content.Context;
import com.nextcloud.talk.utils.PushUtils;
import androidx.annotation.NonNull;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
public class PushRegistrationWorker extends Worker {
public static final String TAG = "PushRegistrationWorker";
public PushRegistrationWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@NonNull
@Override
public Result doWork() {

View file

@ -20,6 +20,7 @@
package com.nextcloud.talk.jobs;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
@ -47,6 +48,7 @@ import androidx.work.Data;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import autodagger.AutoInjector;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
@ -64,6 +66,10 @@ public class SignalingSettingsJob extends Worker {
@Inject
EventBus eventBus;
public SignalingSettingsJob(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@NonNull
@Override
public Result doWork() {

View file

@ -21,6 +21,7 @@
package com.nextcloud.talk.jobs;
import android.annotation.SuppressLint;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
@ -38,6 +39,7 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import autodagger.AutoInjector;
@AutoInjector(NextcloudTalkApplication.class)
@ -48,6 +50,10 @@ public class WebsocketConnectionsWorker extends Worker {
@Inject
UserUtils userUtils;
public WebsocketConnectionsWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
}
@SuppressLint("LongLogTag")
@NonNull
@Override