Move default ProfileModel object creation to ProfileModel class

This commit is contained in:
Ammar Githam 2020-08-16 05:38:46 +09:00
parent fb51995c85
commit 7baa8c2b49
2 changed files with 5 additions and 2 deletions

View File

@ -43,8 +43,7 @@ import static awais.instagrabber.utils.Utils.settingsHelper;
public final class DirectMessageThread extends BaseLanguageActivity {
private DirectItemModel directItemModel;
private final ProfileModel myProfileHolder =
new ProfileModel(false, false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false);
private final ProfileModel myProfileHolder = ProfileModel.getDefaultProfileModel();
private final ArrayList<ProfileModel> users = new ArrayList<>(), leftusers = new ArrayList<>();
private final ArrayList<DirectItemModel> directItemModels = new ArrayList<>();
private String threadid;

View File

@ -31,6 +31,10 @@ public final class ProfileModel implements Serializable {
this.requested = requested;
}
public static ProfileModel getDefaultProfileModel() {
return new ProfileModel(false, false, false, null, null, null, null, null, null, null, 0, 0, 0, false, false, false, false);
}
public boolean isPrivate() {
return isPrivate;
}