mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Updated AndroidX lifecycle
This commit is contained in:
@@ -47,8 +47,8 @@ public class Transformations {
|
||||
* {@code LiveData} containing their full name as a {@code String}.
|
||||
*
|
||||
* <pre>
|
||||
* LiveData<User> userLiveData = ...;
|
||||
* LiveData<String> userFullNameLiveData =
|
||||
* LiveData<User> userLiveData = ...;
|
||||
* LiveData<String> userFullNameLiveData =
|
||||
* Transformations.map(
|
||||
* userLiveData,
|
||||
* user -> user.firstName + user.lastName);
|
||||
@@ -106,9 +106,9 @@ public class Transformations {
|
||||
*
|
||||
* <pre>
|
||||
* class UserViewModel extends AndroidViewModel {
|
||||
* MutableLiveData<String> nameQueryLiveData = ...
|
||||
* MutableLiveData<String> nameQueryLiveData = ...
|
||||
*
|
||||
* LiveData<List<String>> getUsersWithNameLiveData() {
|
||||
* LiveData<List<String>> getUsersWithNameLiveData() {
|
||||
* return Transformations.switchMap(
|
||||
* nameQueryLiveData,
|
||||
* name -> myDataSource.getUsersWithNameLiveData(name));
|
||||
|
||||
Reference in New Issue
Block a user