This repository has been archived on 2020-06-04. You can view files and clone it, but cannot push or open issues or pull requests.
GitNex/app/src/main/java/org/mian/gitnex/viewmodels/UserAccountsDatabaseViewModel.java
M M Arif b656461f08
All checks were successful
continuous-integration/drone/pr Build is passing
Add repos to db
2020-04-20 19:39:31 +05:00

26 lines
505 B
Java

package org.mian.gitnex.viewmodels;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import org.mian.gitnex.database.repository.UserAccountsRepository;
/**
* Author M M Arif
*/
public class UserAccountsDatabaseViewModel extends ViewModel {
private static LiveData<Integer> totalCount;
public static LiveData<Integer> getCount(String accountName) {
if (totalCount == null) {
totalCount = UserAccountsRepository.getCount(accountName);
}
return totalCount;
}
}