|
|
@@ -12,6 +12,7 @@ import com.atmob.common.runtime.ActivityUtil;
|
|
|
import com.atmob.common.runtime.ContextUtil;
|
|
|
import com.atmob.voiceai.R;
|
|
|
import com.atmob.voiceai.data.consts.Constants;
|
|
|
+import com.atmob.voiceai.data.repositories.MemberRepository;
|
|
|
import com.atmob.voiceai.module.subscription.SubscriptionPageActivity;
|
|
|
import com.atmob.voiceai.utils.AppUtil;
|
|
|
import com.atmob.voiceai.utils.CommonUtils;
|
|
|
@@ -27,11 +28,23 @@ public class SettingViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
private final MutableLiveData<String> versionName = new MutableLiveData<>();
|
|
|
+ private final MutableLiveData<String> proName = new MutableLiveData<>();
|
|
|
+ private final MemberRepository memberRepository;
|
|
|
|
|
|
@Inject
|
|
|
- public SettingViewModel() {
|
|
|
+ public SettingViewModel(MemberRepository memberRepository) {
|
|
|
+ this.memberRepository = memberRepository;
|
|
|
Context context = ContextUtil.getContext();
|
|
|
versionName.setValue(context.getString(R.string.version_name, SystemUtil.getVersionName(context)));
|
|
|
+ proName.setValue(context.getString(R.string.setting_app_name_pro, context.getString(R.string.app_name)));
|
|
|
+ }
|
|
|
+
|
|
|
+ public LiveData<String> getProName() {
|
|
|
+ return proName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public LiveData<Boolean> isMember() {
|
|
|
+ return memberRepository.getIsMember();
|
|
|
}
|
|
|
|
|
|
public LiveData<String> getVersionName() {
|