mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Update libsignal-client to 0.14.0
This commit is contained in:
committed by
Cody Henthorne
parent
749bbf428d
commit
057231b9c3
@@ -7,7 +7,9 @@ import androidx.lifecycle.ViewModel;
|
||||
|
||||
import org.thoughtcrime.securesms.logsubmit.SubmitDebugLogRepository;
|
||||
import org.thoughtcrime.securesms.util.livedata.LiveDataUtil;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public class HelpViewModel extends ViewModel {
|
||||
|
||||
@@ -42,7 +44,7 @@ public class HelpViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
int getCategoryIndex() {
|
||||
return Optional.fromNullable(this.categoryIndex.getValue()).or(0);
|
||||
return Optional.ofNullable(this.categoryIndex.getValue()).orElse(0);
|
||||
}
|
||||
|
||||
LiveData<SubmitResult> onSubmitClicked(boolean includeDebugLogs) {
|
||||
@@ -51,7 +53,7 @@ public class HelpViewModel extends ViewModel {
|
||||
if (includeDebugLogs) {
|
||||
submitDebugLogRepository.buildAndSubmitLog(result -> resultLiveData.postValue(new SubmitResult(result, result.isPresent())));
|
||||
} else {
|
||||
resultLiveData.postValue(new SubmitResult(Optional.absent(), false));
|
||||
resultLiveData.postValue(new SubmitResult(Optional.empty(), false));
|
||||
}
|
||||
|
||||
return resultLiveData;
|
||||
|
||||
Reference in New Issue
Block a user