mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
this commit fixed #147 & adds missing dependency for travis.
This commit is contained in:
parent
ae3514a25e
commit
bf8cd92053
@ -4,6 +4,7 @@ apply plugin: "com.neenbedankt.android-apt"
|
||||
apply plugin: 'com.siimkinks.sqlitemagic'
|
||||
apply plugin: 'com.google.firebase.firebase-crash'
|
||||
apply plugin: 'com.novoda.build-properties'
|
||||
apply plugin: "jacoco-android"
|
||||
|
||||
buildProperties {
|
||||
notThere {
|
||||
|
||||
@ -15,12 +15,12 @@ interface ProfileOverviewMvp {
|
||||
|
||||
interface View extends BaseMvp.FAView {
|
||||
void onInitViews(@Nullable UserModel userModel);
|
||||
|
||||
void onInvalidateMenuItem();
|
||||
}
|
||||
|
||||
interface Presenter extends BaseMvp.FAPresenter {
|
||||
|
||||
|
||||
void onFragmentCreated(@Nullable Bundle bundle);
|
||||
|
||||
void onWorkOffline(@NonNull String login);
|
||||
|
||||
@ -22,7 +22,6 @@ class ProfileOverviewPresenter extends BasePresenter<ProfileOverviewMvp.View> im
|
||||
private boolean isFollowing;
|
||||
private String login;
|
||||
|
||||
|
||||
@Override public void onCheckFollowStatus(@NonNull String login) {
|
||||
if (!TextUtils.equals(login, LoginModel.getUser().getLogin()))
|
||||
makeRestCall(RestProvider.getUserService().getFollowStatus(login),
|
||||
@ -69,9 +68,11 @@ class ProfileOverviewPresenter extends BasePresenter<ProfileOverviewMvp.View> im
|
||||
makeRestCall(RestProvider.getUserService().getUser(login),
|
||||
userModel -> {
|
||||
onSendUserToView(userModel);
|
||||
onCheckFollowStatus(login);
|
||||
if (userModel != null) {
|
||||
userModel.save();
|
||||
if (userModel.getType() != null && userModel.getType().equals("user")) {
|
||||
onCheckFollowStatus(login);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -90,8 +90,8 @@ public class ProfileOverviewView extends BaseFragment<ProfileOverviewMvp.View, P
|
||||
getPresenter().onFragmentCreated(getArguments());
|
||||
} else {
|
||||
if (userModel != null) {
|
||||
onInitViews(userModel);
|
||||
onInvalidateMenuItem();
|
||||
onInitViews(userModel);
|
||||
} else {
|
||||
getPresenter().onFragmentCreated(getArguments());
|
||||
}
|
||||
@ -109,6 +109,7 @@ public class ProfileOverviewView extends BaseFragment<ProfileOverviewMvp.View, P
|
||||
progress.setVisibility(View.GONE);
|
||||
if (userModel == null) return;
|
||||
this.userModel = userModel;
|
||||
followBtn.setVisibility(!InputHelper.isEmpty(userModel.getType()) && userModel.getType().equalsIgnoreCase("user") ? View.VISIBLE : View.GONE);
|
||||
username.setText(userModel.getLogin());
|
||||
description.setText(userModel.getBio());
|
||||
avatarLayout.setUrl(userModel.getAvatarUrl(), null);
|
||||
|
||||
@ -14,6 +14,7 @@ buildscript {
|
||||
classpath 'com.siimkinks.sqlitemagic:sqlitemagic-plugin:0.11.0'
|
||||
classpath 'com.google.firebase:firebase-plugins:1.0.5'
|
||||
classpath 'com.novoda:gradle-build-properties-plugin:0.3'
|
||||
classpath "com.dicedmelon.gradle:jacoco-android:0.1.1"
|
||||
}
|
||||
configurations.classpath.exclude group: 'com.android.tools.external.lombok'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user