mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2026-01-25 14:47:05 +00:00
this commit rename classes to their convention naming, activity should be activity & fragment should be fragment & so on.
This commit is contained in:
parent
9b5055e7d7
commit
785c8d46fb
@ -20,7 +20,7 @@
|
||||
android:theme="@style/SplashTheme"
|
||||
tools:replace="android:allowBackup">
|
||||
<activity
|
||||
android:name="com.fastaccess.ui.modules.main.MainView"
|
||||
android:name="com.fastaccess.ui.modules.main.MainActivity"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
@ -29,7 +29,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.login.LoginView"
|
||||
android:name=".ui.modules.login.LoginActivity"
|
||||
android:configChanges="keyboard|orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
@ -48,102 +48,102 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.user.UserPagerView"
|
||||
android:name=".ui.modules.user.UserPagerActivity"
|
||||
android:label="@string/user"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.RepoPagerView"
|
||||
android:name=".ui.modules.repos.RepoPagerActivity"
|
||||
android:label="@string/repo"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.issues.issue.details.IssuePagerView"
|
||||
android:name=".ui.modules.repos.issues.issue.details.IssuePagerActivity"
|
||||
android:label="@string/issue"
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerView">
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.repos.RepoPagerView"/>
|
||||
android:value=".ui.modules.repos.RepoPagerActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.issues.create.CreateIssueView"
|
||||
android:name=".ui.modules.repos.issues.create.CreateIssueActivity"
|
||||
android:configChanges="keyboard|orientation|screenSize"
|
||||
android:label="@string/create_issue"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView"
|
||||
android:name=".ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity"
|
||||
android:label="@string/pull_request"
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerView">
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.repos.RepoPagerView"/>
|
||||
android:value=".ui.modules.repos.RepoPagerActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.code.commit.details.CommitPagerView"
|
||||
android:name=".ui.modules.repos.code.commit.details.CommitPagerActivity"
|
||||
android:label="@string/commit"
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerView">
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.repos.RepoPagerView"/>
|
||||
android:value=".ui.modules.repos.RepoPagerActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.code.CodeViewerView"
|
||||
android:name=".ui.modules.code.CodeViewerActivity"
|
||||
android:configChanges="keyboard|orientation|screenSize"
|
||||
|
||||
android:label="@string/viewer"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.editor.EditorView"
|
||||
android:name=".ui.modules.editor.EditorActivity"
|
||||
android:configChanges="keyboard|orientation|screenSize"
|
||||
android:label="@string/markdown"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.gists.create.CreateGistView"
|
||||
android:name=".ui.modules.gists.create.CreateGistActivity"
|
||||
android:configChanges="keyboard|orientation|screenSize"
|
||||
android:label="@string/create_gist"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.gists.gist.GistView"
|
||||
android:name=".ui.modules.gists.gist.GistActivity"
|
||||
android:label="@string/gist"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.search.SearchView"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:name=".ui.modules.search.SearchActivity"
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.notification.NotificationActivityView"
|
||||
android:name=".ui.modules.notification.NotificationActivity"
|
||||
android:label="@string/notifications"
|
||||
android:parentActivityName=".ui.modules.main.MainView">
|
||||
android:parentActivityName=".ui.modules.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.main.MainView"/>
|
||||
android:value=".ui.modules.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
@ -158,17 +158,17 @@
|
||||
android:name=".ui.modules.gists.GistsListActivity"
|
||||
android:label="@string/public_gists"/>
|
||||
|
||||
<activity android:name=".ui.modules.profile.org.teams.details.TeamPagerView"/>
|
||||
<activity android:name=".ui.modules.profile.org.teams.details.TeamPagerActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.repos.code.files.activity.RepoFilesActivity"
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerView">
|
||||
android:parentActivityName=".ui.modules.repos.RepoPagerActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.modules.repos.RepoPagerView"/>
|
||||
android:value=".ui.modules.repos.RepoPagerActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".ui.modules.filter.issues.FilterIssuesActivityView"/>
|
||||
<activity android:name=".ui.modules.filter.issues.FilterIssuesActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".ui.modules.parser.LinksParserActivity"
|
||||
|
||||
@ -12,41 +12,41 @@ import com.fastaccess.data.dao.model.Gist;
|
||||
import com.fastaccess.data.dao.model.Issue;
|
||||
import com.fastaccess.data.dao.model.PullRequest;
|
||||
import com.fastaccess.data.dao.types.IssueState;
|
||||
import com.fastaccess.ui.modules.gists.gist.comments.GistCommentsView;
|
||||
import com.fastaccess.ui.modules.gists.gist.files.GistFilesListView;
|
||||
import com.fastaccess.ui.modules.gists.gist.comments.GistCommentsFragment;
|
||||
import com.fastaccess.ui.modules.gists.gist.files.GistFilesListFragment;
|
||||
import com.fastaccess.ui.modules.main.issues.MyIssuesView;
|
||||
import com.fastaccess.ui.modules.main.pullrequests.MyPullRequestView;
|
||||
import com.fastaccess.ui.modules.profile.followers.ProfileFollowersView;
|
||||
import com.fastaccess.ui.modules.profile.following.ProfileFollowingView;
|
||||
import com.fastaccess.ui.modules.profile.gists.ProfileGistsView;
|
||||
import com.fastaccess.ui.modules.profile.org.OrgProfileOverviewView;
|
||||
import com.fastaccess.ui.modules.profile.org.feeds.OrgFeedsView;
|
||||
import com.fastaccess.ui.modules.profile.org.members.OrgMembersView;
|
||||
import com.fastaccess.ui.modules.profile.org.repos.OrgReposView;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.OrgTeamView;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.members.TeamMembersView;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.repos.TeamReposView;
|
||||
import com.fastaccess.ui.modules.profile.overview.ProfileOverviewView;
|
||||
import com.fastaccess.ui.modules.profile.repos.ProfileReposView;
|
||||
import com.fastaccess.ui.modules.profile.starred.ProfileStarredView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.RepoCommitsView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.comments.CommitCommentsView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.files.CommitFilesView;
|
||||
import com.fastaccess.ui.modules.repos.code.contributors.RepoContributorsView;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathView;
|
||||
import com.fastaccess.ui.modules.repos.code.prettifier.ViewerView;
|
||||
import com.fastaccess.ui.modules.repos.code.releases.RepoReleasesView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoClosedIssuesView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoOpenedIssuesView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.timeline.IssueTimelineView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.RepoPullRequestView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.commits.PullRequestCommitsView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.files.PullRequestFilesView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineView;
|
||||
import com.fastaccess.ui.modules.search.code.SearchCodeView;
|
||||
import com.fastaccess.ui.modules.search.issues.SearchIssuesView;
|
||||
import com.fastaccess.ui.modules.search.repos.SearchReposView;
|
||||
import com.fastaccess.ui.modules.search.users.SearchUsersView;
|
||||
import com.fastaccess.ui.modules.main.pullrequests.MyPullRequestFragment;
|
||||
import com.fastaccess.ui.modules.profile.followers.ProfileFollowersFragment;
|
||||
import com.fastaccess.ui.modules.profile.following.ProfileFollowingFragment;
|
||||
import com.fastaccess.ui.modules.profile.gists.ProfileGistsFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.OrgProfileOverviewFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.feeds.OrgFeedsFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.members.OrgMembersFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.repos.OrgReposFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.OrgTeamFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.members.TeamMembersFragment;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.repos.TeamReposFragment;
|
||||
import com.fastaccess.ui.modules.profile.overview.ProfileOverviewFragment;
|
||||
import com.fastaccess.ui.modules.profile.repos.ProfileReposFragment;
|
||||
import com.fastaccess.ui.modules.profile.starred.ProfileStarredFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.RepoCommitsFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.comments.CommitCommentsFragments;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.files.CommitFilesFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.contributors.RepoContributorsFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.prettifier.ViewerFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.releases.RepoReleasesFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoClosedIssuesFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoOpenedIssuesFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.timeline.IssueTimelineFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.RepoPullRequestFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.commits.PullRequestCommitsFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.files.PullRequestFilesFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineFragment;
|
||||
import com.fastaccess.ui.modules.search.code.SearchCodeFragment;
|
||||
import com.fastaccess.ui.modules.search.issues.SearchIssuesFragment;
|
||||
import com.fastaccess.ui.modules.search.repos.SearchReposFragment;
|
||||
import com.fastaccess.ui.modules.search.users.SearchUsersFragment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -68,36 +68,36 @@ import lombok.Setter;
|
||||
}
|
||||
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForProfile(@NonNull Context context, @NonNull String login) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.overview), ProfileOverviewView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), ProfileReposView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.starred), ProfileStarredView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.gists), ProfileGistsView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.followers), ProfileFollowersView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.following), ProfileFollowingView.newInstance(login)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.overview), ProfileOverviewFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), ProfileReposFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.starred), ProfileStarredFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.gists), ProfileGistsFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.followers), ProfileFollowersFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.following), ProfileFollowingFragment.newInstance(login)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<FragmentPagerAdapterModel> buildForRepoCode(@NonNull Context context, @NonNull String repoId,
|
||||
@NonNull String login, @NonNull String url,
|
||||
@NonNull String defaultBranch) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.readme), ViewerView.newInstance(url, true)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.files), RepoFilePathView.newInstance(login, repoId, null, defaultBranch)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.commits), RepoCommitsView.newInstance(repoId, login, defaultBranch)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.releases), RepoReleasesView.newInstance(repoId, login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.contributors), RepoContributorsView.newInstance(repoId, login)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.readme), ViewerFragment.newInstance(url, true)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.files), RepoFilePathFragment.newInstance(login, repoId, null, defaultBranch)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.commits), RepoCommitsFragment.newInstance(repoId, login, defaultBranch)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.releases), RepoReleasesFragment.newInstance(repoId, login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.contributors), RepoContributorsFragment.newInstance(repoId, login)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForSearch(@NonNull Context context) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.repos), SearchReposView.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.users), SearchUsersView.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.issues), SearchIssuesView.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.code), SearchCodeView.newInstance()))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.repos), SearchReposFragment.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.users), SearchUsersFragment.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.issues), SearchIssuesFragment.newInstance()),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.code), SearchCodeFragment.newInstance()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForIssues(@NonNull Context context, @NonNull Issue issueModel) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.details), IssueTimelineView.newInstance(issueModel)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.details), IssueTimelineFragment.newInstance(issueModel)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -106,9 +106,9 @@ import lombok.Setter;
|
||||
String login = pullRequest.getLogin();
|
||||
String repoId = pullRequest.getRepoId();
|
||||
int number = pullRequest.getNumber();
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.details), PullRequestTimelineView.newInstance(pullRequest)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.commits), PullRequestCommitsView.newInstance(repoId, login, number)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.files), PullRequestFilesView.newInstance(repoId, login, number)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.details), PullRequestTimelineFragment.newInstance(pullRequest)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.commits), PullRequestCommitsFragment.newInstance(repoId, login, number)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.files), PullRequestFilesFragment.newInstance(repoId, login, number)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -116,18 +116,18 @@ import lombok.Setter;
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForRepoIssue(@NonNull Context context, @NonNull String login,
|
||||
@NonNull String repoId) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.opened),
|
||||
RepoOpenedIssuesView.newInstance(repoId, login)),
|
||||
RepoOpenedIssuesFragment.newInstance(repoId, login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.closed),
|
||||
RepoClosedIssuesView.newInstance(repoId, login)))
|
||||
RepoClosedIssuesFragment.newInstance(repoId, login)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForRepoPullRequest(@NonNull Context context, @NonNull String login,
|
||||
@NonNull String repoId) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.opened),
|
||||
RepoPullRequestView.newInstance(repoId, login, IssueState.open)),
|
||||
RepoPullRequestFragment.newInstance(repoId, login, IssueState.open)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.closed),
|
||||
RepoPullRequestView.newInstance(repoId, login, IssueState.closed)))
|
||||
RepoPullRequestFragment.newInstance(repoId, login, IssueState.closed)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -135,16 +135,16 @@ import lombok.Setter;
|
||||
String login = commitModel.getLogin();
|
||||
String repoId = commitModel.getRepoId();
|
||||
String sha = commitModel.getSha();
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.commits), CommitFilesView.newInstance(commitModel.getSha(),
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.commits), CommitFilesFragment.newInstance(commitModel.getSha(),
|
||||
commitModel.getFiles()))
|
||||
, new FragmentPagerAdapterModel(context.getString(R.string.comments), CommitCommentsView.newInstance(login, repoId, sha)))
|
||||
, new FragmentPagerAdapterModel(context.getString(R.string.comments), CommitCommentsFragments.newInstance(login, repoId, sha)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@NonNull public static List<FragmentPagerAdapterModel> buildForGist(@NonNull Context context, @NonNull Gist gistsModel) {
|
||||
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.files), GistFilesListView.newInstance(gistsModel.getFiles())),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.comments), GistCommentsView.newInstance(gistsModel.getGistId())))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.files), GistFilesListFragment.newInstance(gistsModel.getFiles())),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.comments), GistCommentsFragment.newInstance(gistsModel.getGistId())))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -155,25 +155,25 @@ import lombok.Setter;
|
||||
}
|
||||
|
||||
public static List<FragmentPagerAdapterModel> buildForMyPulls(@NonNull Context context) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.open), MyPullRequestView.newInstance(IssueState.open))
|
||||
, new FragmentPagerAdapterModel(context.getString(R.string.closed), MyPullRequestView.newInstance(IssueState.closed)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.open), MyPullRequestFragment.newInstance(IssueState.open))
|
||||
, new FragmentPagerAdapterModel(context.getString(R.string.closed), MyPullRequestFragment.newInstance(IssueState.closed)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<FragmentPagerAdapterModel> buildForOrg(@NonNull Context context, @NonNull String login, boolean isMember) {
|
||||
return Stream.of(
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.feeds), isMember ? OrgFeedsView.newInstance(login) : null),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.overview), OrgProfileOverviewView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), OrgReposView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.people), OrgMembersView.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.teams), isMember ? OrgTeamView.newInstance(login) : null))
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.feeds), isMember ? OrgFeedsFragment.newInstance(login) : null),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.overview), OrgProfileOverviewFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), OrgReposFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.people), OrgMembersFragment.newInstance(login)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.teams), isMember ? OrgTeamFragment.newInstance(login) : null))
|
||||
.filter(fragmentPagerAdapterModel -> fragmentPagerAdapterModel.getFragment() != null)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<FragmentPagerAdapterModel> buildForTeam(@NonNull Context context, long id) {
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.members), TeamMembersView.newInstance(id)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), TeamReposView.newInstance(id)))
|
||||
return Stream.of(new FragmentPagerAdapterModel(context.getString(R.string.members), TeamMembersFragment.newInstance(id)),
|
||||
new FragmentPagerAdapterModel(context.getString(R.string.repos), TeamReposFragment.newInstance(id)))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,8 +33,6 @@ public class Logger {
|
||||
Log.i(tag, text != null ? text.toString() : "LOGGER IS NULL");//avoid null
|
||||
}
|
||||
|
||||
public static void e(@Nullable Object text) {e(getCurrentClassName() + " || " + getCurrentMethodName(), text);}
|
||||
|
||||
public static void d(@Nullable Object text) {
|
||||
d(getCurrentClassName() + " || " + getCurrentMethodName(), text);//avoid null
|
||||
}
|
||||
|
||||
@ -14,14 +14,14 @@ import com.annimon.stream.Optional;
|
||||
import com.fastaccess.helper.ActivityHelper;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerView;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.user.UserPagerView;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerActivity;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity;
|
||||
import com.fastaccess.ui.modules.user.UserPagerActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -88,7 +88,7 @@ public class SchemeParser {
|
||||
if (HOST_GISTS.equals(data.getHost())) {
|
||||
String gist = getGistId(data);
|
||||
if (gist != null) {
|
||||
return GistView.createIntent(context, gist);
|
||||
return GistActivity.createIntent(context, gist);
|
||||
}
|
||||
} else if (HOST_GISTS_RAW.equalsIgnoreCase(data.getHost())) {
|
||||
return getGistFile(context, data);
|
||||
@ -143,7 +143,7 @@ public class SchemeParser {
|
||||
return null;
|
||||
}
|
||||
if (issueNumber < 1) return null;
|
||||
return PullRequestPagerView.createIntent(context, repo, owner, issueNumber, showRepoBtn);
|
||||
return PullRequestPagerActivity.createIntent(context, repo, owner, issueNumber, showRepoBtn);
|
||||
}
|
||||
|
||||
@Nullable private static Intent getIssueIntent(@NonNull Context context, @NonNull Uri uri, boolean showRepoBtn) {
|
||||
@ -172,7 +172,7 @@ public class SchemeParser {
|
||||
return null;
|
||||
}
|
||||
if (issueNumber < 1) return null;
|
||||
return IssuePagerView.createIntent(context, repo, owner, issueNumber, showRepoBtn);
|
||||
return IssuePagerActivity.createIntent(context, repo, owner, issueNumber, showRepoBtn);
|
||||
}
|
||||
|
||||
@Nullable private static Intent getRepo(@NonNull Context context, @NonNull Uri uri) {
|
||||
@ -180,7 +180,7 @@ public class SchemeParser {
|
||||
if (segments == null || segments.size() < 2 || segments.size() > 2) return null;
|
||||
String owner = segments.get(0);
|
||||
String repoName = segments.get(1);
|
||||
return RepoPagerView.createIntent(context, repoName, owner);
|
||||
return RepoPagerActivity.createIntent(context, repoName, owner);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -196,7 +196,7 @@ public class SchemeParser {
|
||||
} else if (segments.size() > 1) {
|
||||
String owner = segments.get(0);
|
||||
String repoName = segments.get(1);
|
||||
return RepoPagerView.createIntent(context, repoName, owner);
|
||||
return RepoPagerActivity.createIntent(context, repoName, owner);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -209,7 +209,7 @@ public class SchemeParser {
|
||||
String login = segments.get(1);
|
||||
String repoId = segments.get(2);
|
||||
String sha = segments.get(4);
|
||||
return CommitPagerView.createIntent(context, repoId, login, sha, showRepoBtn);
|
||||
return CommitPagerActivity.createIntent(context, repoId, login, sha, showRepoBtn);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -220,7 +220,7 @@ public class SchemeParser {
|
||||
String login = segments.get(0);
|
||||
String repoId = segments.get(1);
|
||||
String sha = segments.get(3);
|
||||
return CommitPagerView.createIntent(context, repoId, login, sha, showRepoBtn);
|
||||
return CommitPagerActivity.createIntent(context, repoId, login, sha, showRepoBtn);
|
||||
}
|
||||
|
||||
@Nullable private static String getGistId(@NonNull Uri uri) {
|
||||
@ -231,9 +231,9 @@ public class SchemeParser {
|
||||
@Nullable private static Intent getUser(@NonNull Context context, @NonNull Uri uri) {
|
||||
List<String> segments = uri.getPathSegments();
|
||||
if (segments != null && !segments.isEmpty() && segments.size() == 1) {
|
||||
return UserPagerView.createIntent(context, segments.get(0));
|
||||
return UserPagerActivity.createIntent(context, segments.get(0));
|
||||
} else if (segments != null && !segments.isEmpty() && segments.size() > 1 && segments.get(0).equalsIgnoreCase("orgs")) {
|
||||
return UserPagerView.createIntent(context, segments.get(1), true);
|
||||
return UserPagerActivity.createIntent(context, segments.get(1), true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -256,11 +256,11 @@ public class SchemeParser {
|
||||
fullUrl += "/" + segments.get(i);
|
||||
}
|
||||
}
|
||||
if (fullUrl != null) return CodeViewerView.createIntent(context, fullUrl);
|
||||
if (fullUrl != null) return CodeViewerActivity.createIntent(context, fullUrl);
|
||||
} else {
|
||||
String authority = uri.getAuthority();
|
||||
if (TextUtils.equals(authority, RAW_AUTHORITY)) {
|
||||
return CodeViewerView.createIntent(context, uri.toString());
|
||||
return CodeViewerActivity.createIntent(context, uri.toString());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -277,14 +277,14 @@ public class SchemeParser {
|
||||
if ("issues".equals(segments.get(2))) {
|
||||
String owner = segments.get(0);
|
||||
String repo = segments.get(1);
|
||||
return CreateIssueView.getIntent(context, owner, repo);
|
||||
return CreateIssueActivity.getIntent(context, owner, repo);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable private static Intent getGistFile(@NonNull Context context, @NonNull Uri uri) {
|
||||
if (uri.getHost().equalsIgnoreCase(HOST_GISTS_RAW)) {
|
||||
return CodeViewerView.createIntent(context, uri.toString());
|
||||
return CodeViewerActivity.createIntent(context, uri.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -13,17 +13,17 @@ import com.annimon.stream.Optional;
|
||||
import com.fastaccess.helper.ActivityHelper;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerView;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistView;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerActivity;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistActivity;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.files.activity.RepoFilesActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.user.UserPagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity;
|
||||
import com.fastaccess.ui.modules.user.UserPagerActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -89,9 +89,9 @@ public class StackBuilderSchemeParser {
|
||||
String gist = getGistId(data);
|
||||
if (gist != null) {
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntent(GistView.createIntent(context, gist));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntent(GistActivity.createIntent(context, gist));
|
||||
}
|
||||
} else if (HOST_GISTS_RAW.equalsIgnoreCase(data.getHost())) {
|
||||
return getGistFile(context, data);
|
||||
@ -147,10 +147,10 @@ public class StackBuilderSchemeParser {
|
||||
}
|
||||
if (issueNumber < 1) return null;
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repo, owner, RepoPagerMvp.PULL_REQUEST))
|
||||
.addNextIntent(PullRequestPagerView.createIntent(context, repo, owner, issueNumber));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repo, owner, RepoPagerMvp.PULL_REQUEST))
|
||||
.addNextIntent(PullRequestPagerActivity.createIntent(context, repo, owner, issueNumber));
|
||||
}
|
||||
|
||||
@Nullable private static TaskStackBuilder getIssueIntent(@NonNull Context context, @NonNull Uri uri) {
|
||||
@ -180,10 +180,10 @@ public class StackBuilderSchemeParser {
|
||||
}
|
||||
if (issueNumber < 1) return null;
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repo, owner, RepoPagerMvp.ISSUES))
|
||||
.addNextIntent(IssuePagerView.createIntent(context, repo, owner, issueNumber));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repo, owner, RepoPagerMvp.ISSUES))
|
||||
.addNextIntent(IssuePagerActivity.createIntent(context, repo, owner, issueNumber));
|
||||
}
|
||||
|
||||
@Nullable private static TaskStackBuilder getRepo(@NonNull Context context, @NonNull Uri uri) {
|
||||
@ -192,9 +192,9 @@ public class StackBuilderSchemeParser {
|
||||
String owner = segments.get(0);
|
||||
String repoName = segments.get(1);
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntent(RepoPagerView.createIntent(context, repoName, owner));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntent(RepoPagerActivity.createIntent(context, repoName, owner));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -211,9 +211,9 @@ public class StackBuilderSchemeParser {
|
||||
String owner = segments.get(0);
|
||||
String repoName = segments.get(1);
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntent(RepoPagerView.createIntent(context, repoName, owner));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntent(RepoPagerActivity.createIntent(context, repoName, owner));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -236,10 +236,10 @@ public class StackBuilderSchemeParser {
|
||||
}
|
||||
if (login != null && sha != null && repoId != null) {
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repoId, login))
|
||||
.addNextIntent(CommitPagerView.createIntent(context, repoId, login, sha));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repoId, login))
|
||||
.addNextIntent(CommitPagerActivity.createIntent(context, repoId, login, sha));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -251,24 +251,24 @@ public class StackBuilderSchemeParser {
|
||||
String repoId = segments.get(1);
|
||||
String sha = segments.get(3);
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repoId, login))
|
||||
.addNextIntent(CommitPagerView.createIntent(context, repoId, login, sha));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repoId, login))
|
||||
.addNextIntent(CommitPagerActivity.createIntent(context, repoId, login, sha));
|
||||
}
|
||||
|
||||
@Nullable private static TaskStackBuilder getUser(@NonNull Context context, @NonNull Uri uri) {
|
||||
List<String> segments = uri.getPathSegments();
|
||||
if (segments != null && !segments.isEmpty() && segments.size() == 1) {
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntent(UserPagerView.createIntent(context, segments.get(0)));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntent(UserPagerActivity.createIntent(context, segments.get(0)));
|
||||
} else if (segments != null && !segments.isEmpty() && segments.size() > 1 && segments.get(0).equalsIgnoreCase("orgs")) {
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntent(UserPagerView.createIntent(context, segments.get(1), true));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntent(UserPagerActivity.createIntent(context, segments.get(1), true));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -294,22 +294,22 @@ public class StackBuilderSchemeParser {
|
||||
}
|
||||
}
|
||||
if (fullUrl.length() > 0 && owner != null && repo != null) return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repo, owner))
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repo, owner))
|
||||
.addNextIntentWithParentStack(RepoFilesActivity.getIntent(context, fullUrl.toString()))
|
||||
.addNextIntent(CodeViewerView.createIntent(context, fullUrl.toString()));
|
||||
.addNextIntent(CodeViewerActivity.createIntent(context, fullUrl.toString()));
|
||||
} else {
|
||||
String authority = uri.getAuthority();
|
||||
if (TextUtils.equals(authority, RAW_AUTHORITY)) {
|
||||
String owner = uri.getPathSegments().get(0);
|
||||
String repo = uri.getPathSegments().get(1);
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repo, owner))
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repo, owner))
|
||||
.addNextIntentWithParentStack(RepoFilesActivity.getIntent(context, uri.toString()))
|
||||
.addNextIntent(CodeViewerView.createIntent(context, uri.toString()));
|
||||
.addNextIntent(CodeViewerActivity.createIntent(context, uri.toString()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -324,10 +324,10 @@ public class StackBuilderSchemeParser {
|
||||
String owner = segments.get(0);
|
||||
String repo = segments.get(1);
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(RepoPagerView.createIntent(context, repo, owner, RepoPagerMvp.ISSUES))
|
||||
.addNextIntent(CreateIssueView.getIntent(context, owner, repo));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(RepoPagerActivity.createIntent(context, repo, owner, RepoPagerMvp.ISSUES))
|
||||
.addNextIntent(CreateIssueActivity.getIntent(context, owner, repo));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -335,10 +335,10 @@ public class StackBuilderSchemeParser {
|
||||
@Nullable private static TaskStackBuilder getGistFile(@NonNull Context context, @NonNull Uri uri) {
|
||||
if (uri.getHost().equalsIgnoreCase(HOST_GISTS_RAW)) {
|
||||
return TaskStackBuilder.create(context)
|
||||
.addParentStack(MainView.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainView.class))
|
||||
.addNextIntentWithParentStack(GistView.createIntent(context, uri.getPathSegments().get(1)))
|
||||
.addNextIntent(CodeViewerView.createIntent(context, uri.toString()));
|
||||
.addParentStack(MainActivity.class)
|
||||
.addNextIntentWithParentStack(new Intent(context, MainActivity.class))
|
||||
.addNextIntentWithParentStack(GistActivity.createIntent(context, uri.getPathSegments().get(1)))
|
||||
.addNextIntent(CodeViewerActivity.createIntent(context, uri.toString()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -33,14 +33,14 @@ import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.UsersAdapter;
|
||||
import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.changelog.ChangelogView;
|
||||
import com.fastaccess.ui.modules.changelog.ChangelogBottomSheetDialog;
|
||||
import com.fastaccess.ui.modules.gists.GistsListActivity;
|
||||
import com.fastaccess.ui.modules.login.LoginView;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.login.LoginActivity;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
import com.fastaccess.ui.modules.main.donation.DonationView;
|
||||
import com.fastaccess.ui.modules.pinned.PinnedReposActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.user.UserPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.user.UserPagerActivity;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.ProgressDialogFragment;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
@ -91,7 +91,7 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
}
|
||||
if (!isSecured()) {
|
||||
if (!isLoggedIn()) {
|
||||
startActivity(new Intent(this, LoginView.class));
|
||||
startActivity(new Intent(this, LoginActivity.class));
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
@ -103,7 +103,7 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
setupToolbarAndStatusBar(toolbar);
|
||||
showHideAds();
|
||||
if (savedInstanceState == null && PrefGetter.showWhatsNew()) {
|
||||
new ChangelogView().show(getSupportFragmentManager(), "ChangelogView");
|
||||
new ChangelogBottomSheetDialog().show(getSupportFragmentManager(), "ChangelogBottomSheetDialog");
|
||||
}
|
||||
setupNavigationView(extraNav);
|
||||
setupDrawer();
|
||||
@ -198,7 +198,7 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
onNavToRepoClicked();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.fhRepo) {
|
||||
startActivity(RepoPagerView.createIntent(this, "FastHub", "k0shk0sh"));
|
||||
startActivity(RepoPagerActivity.createIntent(this, "FastHub", "k0shk0sh"));
|
||||
} else if (item.getItemId() == R.id.supportDev) {
|
||||
new DonationView().show(getSupportFragmentManager(), "DonationView");
|
||||
} else if (item.getItemId() == R.id.gists) {
|
||||
@ -211,12 +211,12 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
PinnedReposActivity.startActivity(this);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.mainView) {
|
||||
Intent intent = new Intent(this, MainView.class);
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.profile) {
|
||||
startActivity(UserPagerView.createIntent(this, Login.getUser().getLogin()));
|
||||
startActivity(UserPagerActivity.createIntent(this, Login.getUser().getLogin()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -260,7 +260,7 @@ public abstract class BaseActivity<V extends BaseMvp.FAView, P extends BasePrese
|
||||
.show();
|
||||
}
|
||||
navIcon.setOnLongClickListener(v -> {
|
||||
Intent intent = new Intent(this, MainView.class);
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
return true;
|
||||
|
||||
@ -19,9 +19,9 @@ import com.fastaccess.R;
|
||||
import com.fastaccess.helper.ActivityHelper;
|
||||
import com.fastaccess.helper.BundleConstant;
|
||||
import com.fastaccess.helper.PrefGetter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.user.UserPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.user.UserPagerActivity;
|
||||
|
||||
import es.dmoral.toasty.Toasty;
|
||||
|
||||
@ -59,7 +59,7 @@ public class FastHubAboutActivity extends MaterialAboutActivity {
|
||||
.text(R.string.report_issue)
|
||||
.subText(R.string.report_issue_here)
|
||||
.icon(ContextCompat.getDrawable(context, R.drawable.ic_bug))
|
||||
.setOnClickListener(b -> CreateIssueView.startForResult(this, CreateIssueView.startForResult(this), malRecyclerview))
|
||||
.setOnClickListener(b -> CreateIssueActivity.startForResult(this, CreateIssueActivity.startForResult(this), malRecyclerview))
|
||||
.build());
|
||||
|
||||
MaterialAboutCard.Builder authorCardBuilder = new MaterialAboutCard.Builder();
|
||||
@ -68,12 +68,12 @@ public class FastHubAboutActivity extends MaterialAboutActivity {
|
||||
.text("Kosh")
|
||||
.subText("k0shk0sh")
|
||||
.icon(ContextCompat.getDrawable(context, R.drawable.ic_profile))
|
||||
.setOnClickListener(b -> UserPagerView.startActivity(context, "k0shk0sh"))
|
||||
.setOnClickListener(b -> UserPagerActivity.startActivity(context, "k0shk0sh"))
|
||||
.build());
|
||||
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.fork_github)
|
||||
.icon(ContextCompat.getDrawable(context, R.drawable.ic_github))
|
||||
.setOnClickListener(b -> startActivity(RepoPagerView.createIntent(this, "FastHub", "k0shk0sh")))
|
||||
.setOnClickListener(b -> startActivity(RepoPagerActivity.createIntent(this, "FastHub", "k0shk0sh")))
|
||||
.build());
|
||||
|
||||
authorCardBuilder.addItem(ConvenienceBuilder.createEmailItem(context, ContextCompat.getDrawable(context, R.drawable.ic_email),
|
||||
|
||||
@ -24,7 +24,7 @@ import rx.Subscription;
|
||||
* Created by Kosh on 26 Mar 2017, 10:15 PM
|
||||
*/
|
||||
|
||||
public class ChangelogView extends BaseBottomSheetDialog {
|
||||
public class ChangelogBottomSheetDialog extends BaseBottomSheetDialog {
|
||||
|
||||
@BindView(R.id.title) FontTextView title;
|
||||
@BindView(R.id.message) FontTextView message;
|
||||
@ -19,9 +19,9 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistView;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.files.activity.RepoFilesActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.prettifier.ViewerView;
|
||||
import com.fastaccess.ui.modules.repos.code.prettifier.ViewerFragment;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
@ -31,7 +31,7 @@ import icepick.State;
|
||||
* Created by Kosh on 27 Nov 2016, 3:43 PM
|
||||
*/
|
||||
|
||||
public class CodeViewerView extends BaseActivity {
|
||||
public class CodeViewerActivity extends BaseActivity {
|
||||
|
||||
@State String url;
|
||||
|
||||
@ -40,7 +40,7 @@ public class CodeViewerView extends BaseActivity {
|
||||
}
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String url) {
|
||||
Intent intent = new Intent(context, CodeViewerView.class);
|
||||
Intent intent = new Intent(context, CodeViewerActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, url)
|
||||
.end());
|
||||
@ -76,7 +76,7 @@ public class CodeViewerView extends BaseActivity {
|
||||
url = Objects.requireNonNull(bundle.getString(BundleConstant.EXTRA), "Url is null");
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.container, ViewerView.newInstance(url), ViewerView.TAG)
|
||||
.replace(R.id.container, ViewerFragment.newInstance(url), ViewerFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
setTitle(Uri.parse(url).getLastPathSegment());
|
||||
@ -107,7 +107,7 @@ public class CodeViewerView extends BaseActivity {
|
||||
Uri uri = Uri.parse(url);
|
||||
if (uri.getHost().contains("gist.github")) {
|
||||
if (uri.getPathSegments() != null && !uri.getPathSegments().isEmpty() && uri.getPathSegments().size() >= 1) {
|
||||
GistView.createIntent(this, uri.getPathSegments().get(1));
|
||||
GistActivity.createIntent(this, uri.getPathSegments().get(1));
|
||||
}
|
||||
} else {
|
||||
RepoFilesActivity.startActivity(this, url);
|
||||
@ -34,7 +34,7 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 27 Nov 2016, 1:32 AM
|
||||
*/
|
||||
|
||||
public class EditorView extends BaseActivity<EditorMvp.View, EditorPresenter> implements EditorMvp.View {
|
||||
public class EditorActivity extends BaseActivity<EditorMvp.View, EditorPresenter> implements EditorMvp.View {
|
||||
|
||||
private CharSequence savedText;
|
||||
@BindView(R.id.view) ForegroundImageView viewCode;
|
||||
@ -30,9 +30,9 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class FeedsView extends BaseFragment<FeedsMvp.View, FeedsPresenter> implements FeedsMvp.View {
|
||||
public class FeedsFragment extends BaseFragment<FeedsMvp.View, FeedsPresenter> implements FeedsMvp.View {
|
||||
|
||||
public static final String TAG = FeedsView.class.getSimpleName();
|
||||
public static final String TAG = FeedsFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -40,8 +40,8 @@ public class FeedsView extends BaseFragment<FeedsMvp.View, FeedsPresenter> imple
|
||||
private FeedsAdapter adapter;
|
||||
private OnLoadMore onLoadMore;
|
||||
|
||||
public static FeedsView newInstance() {
|
||||
return new FeedsView();
|
||||
public static FeedsFragment newInstance() {
|
||||
return new FeedsFragment();
|
||||
}
|
||||
|
||||
@Override protected int fragmentLayout() {
|
||||
@ -18,7 +18,7 @@ import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.provider.scheme.SchemeParser;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -104,7 +104,7 @@ class FeedsPresenter extends BasePresenter<FeedsMvp.View> implements FeedsMvp.Pr
|
||||
@Override public void onItemClick(int position, View v, Event item) {
|
||||
if (item.getType() == EventsType.ForkEvent) {
|
||||
NameParser parser = new NameParser(item.getPayload().getForkee().getHtmlUrl());
|
||||
RepoPagerView.startRepoPager(v.getContext(), parser);
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), parser);
|
||||
} else {
|
||||
PayloadModel payloadModel = item.getPayload();
|
||||
if (payloadModel != null) {
|
||||
|
||||
@ -12,12 +12,12 @@ import butterknife.OnClick;
|
||||
* Created by Kosh on 10 Apr 2017, 12:18 PM
|
||||
*/
|
||||
|
||||
public class FilterChooserDialogView extends BaseBottomSheetDialog {
|
||||
public class FilterChooserBottomSheetDialog extends BaseBottomSheetDialog {
|
||||
|
||||
private FilterAddChooserListener listener;
|
||||
|
||||
public static FilterChooserDialogView newInstance() {
|
||||
return new FilterChooserDialogView();
|
||||
public static FilterChooserBottomSheetDialog newInstance() {
|
||||
return new FilterChooserBottomSheetDialog();
|
||||
}
|
||||
|
||||
@Override public void onAttach(Context context) {
|
||||
@ -31,7 +31,7 @@ import com.fastaccess.ui.adapter.MilestonesAdapter;
|
||||
import com.fastaccess.ui.adapter.SimpleListAdapter;
|
||||
import com.fastaccess.ui.adapter.UsersAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.filter.issues.fragment.FilterIssueView;
|
||||
import com.fastaccess.ui.modules.filter.issues.fragment.FilterIssueFragment;
|
||||
import com.fastaccess.ui.widgets.FontEditText;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ForegroundImageView;
|
||||
@ -53,7 +53,7 @@ import icepick.State;
|
||||
* Created by Kosh on 09 Apr 2017, 6:23 PM
|
||||
*/
|
||||
|
||||
public class FilterIssuesActivityView extends BaseActivity<FilterIssuesActivityMvp.View, FilterIssuesActivityPresenter> implements
|
||||
public class FilterIssuesActivity extends BaseActivity<FilterIssuesActivityMvp.View, FilterIssuesActivityPresenter> implements
|
||||
FilterIssuesActivityMvp.View {
|
||||
@BindView(R.id.back) ForegroundImageView back;
|
||||
@BindView(R.id.open) FontTextView open;
|
||||
@ -70,7 +70,7 @@ public class FilterIssuesActivityView extends BaseActivity<FilterIssuesActivityM
|
||||
@State String login;
|
||||
@State String repoId;
|
||||
|
||||
private FilterIssueView filterFragment;
|
||||
private FilterIssueFragment filterFragment;
|
||||
private MilestonesAdapter milestonesAdapter;
|
||||
private LabelsAdapter labelsAdapter;
|
||||
private UsersAdapter assigneesAdapter;
|
||||
@ -78,7 +78,7 @@ public class FilterIssuesActivityView extends BaseActivity<FilterIssuesActivityM
|
||||
|
||||
public static void startActivity(@NonNull Activity context, @NonNull String login, @NonNull String repoId,
|
||||
boolean isIssue, boolean isOpen) {
|
||||
Intent intent = new Intent(context, FilterIssuesActivityView.class);
|
||||
Intent intent = new Intent(context, FilterIssuesActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -299,9 +299,9 @@ public class FilterIssuesActivityView extends BaseActivity<FilterIssuesActivityM
|
||||
}
|
||||
}
|
||||
|
||||
private FilterIssueView getFilterFragment() {
|
||||
private FilterIssueFragment getFilterFragment() {
|
||||
if (filterFragment == null) {
|
||||
filterFragment = (FilterIssueView) getSupportFragmentManager().findFragmentById(R.id.filterFragment);
|
||||
filterFragment = (FilterIssueFragment) getSupportFragmentManager().findFragmentById(R.id.filterFragment);
|
||||
}
|
||||
return filterFragment;
|
||||
}
|
||||
@ -25,7 +25,7 @@ import icepick.State;
|
||||
* Created by Kosh on 09 Apr 2017, 7:13 PM
|
||||
*/
|
||||
|
||||
public class FilterIssueView extends BaseFragment<FilterIssuesMvp.View, FilterIssuePresenter> implements FilterIssuesMvp.View {
|
||||
public class FilterIssueFragment extends BaseFragment<FilterIssuesMvp.View, FilterIssuePresenter> implements FilterIssuesMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -8,7 +8,7 @@ import com.fastaccess.data.dao.PullsIssuesParser;
|
||||
import com.fastaccess.data.dao.model.Issue;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -27,7 +27,7 @@ public class FilterIssuePresenter extends BasePresenter<FilterIssuesMvp.View> im
|
||||
@Override public void onItemClick(int position, View v, Issue item) {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForIssue(item.getHtmlUrl());
|
||||
if (parser != null) {
|
||||
v.getContext().startActivity(IssuePagerView.createIntent(v.getContext(), parser.getRepoId(),
|
||||
v.getContext().startActivity(IssuePagerActivity.createIntent(v.getContext(), parser.getRepoId(),
|
||||
parser.getLogin(), parser.getNumber(), true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,9 +20,9 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class GistsView extends BaseFragment<GistsMvp.View, GistsPresenter> implements GistsMvp.View {
|
||||
public class GistsFragment extends BaseFragment<GistsMvp.View, GistsPresenter> implements GistsMvp.View {
|
||||
|
||||
public static final String TAG = GistsView.class.getSimpleName();
|
||||
public static final String TAG = GistsFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -31,8 +31,8 @@ public class GistsView extends BaseFragment<GistsMvp.View, GistsPresenter> imple
|
||||
private GistsAdapter adapter;
|
||||
private OnLoadMore onLoadMore;
|
||||
|
||||
public static GistsView newInstance() {
|
||||
return new GistsView();
|
||||
public static GistsFragment newInstance() {
|
||||
return new GistsFragment();
|
||||
}
|
||||
|
||||
@Override protected int fragmentLayout() {
|
||||
@ -13,8 +13,8 @@ import com.fastaccess.helper.BundleConstant;
|
||||
import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.gists.create.CreateGistView;
|
||||
import com.fastaccess.ui.modules.profile.gists.ProfileGistsView;
|
||||
import com.fastaccess.ui.modules.gists.create.CreateGistActivity;
|
||||
import com.fastaccess.ui.modules.profile.gists.ProfileGistsFragment;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
@ -64,8 +64,8 @@ public class GistsListActivity extends BaseActivity {
|
||||
myGists = getIntent().getExtras().getBoolean(BundleConstant.EXTRA);
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.fragmentContainer, myGists ? ProfileGistsView.newInstance(Login.getUser().getLogin())
|
||||
: GistsView.newInstance(), GistsView.TAG)
|
||||
.replace(R.id.fragmentContainer, myGists ? ProfileGistsFragment.newInstance(Login.getUser().getLogin())
|
||||
: GistsFragment.newInstance(), GistsFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
setTitle(myGists ? R.string.my_gists : R.string.public_gists);
|
||||
@ -73,6 +73,6 @@ public class GistsListActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
@OnClick(R.id.fab) public void onViewClicked() {
|
||||
ActivityHelper.startReveal(this, new Intent(this, CreateGistView.class), fab);
|
||||
ActivityHelper.startReveal(this, new Intent(this, CreateGistActivity.class), fab);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import com.fastaccess.data.dao.model.Gist;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistView;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -81,7 +81,7 @@ class GistsPresenter extends BasePresenter<GistsMvp.View> implements GistsMvp.Pr
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Gist item) {
|
||||
v.getContext().startActivity(GistView.createIntent(v.getContext(), item.getGistId()));
|
||||
v.getContext().startActivity(GistActivity.createIntent(v.getContext(), item.getGistId()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Gist item) {
|
||||
|
||||
@ -16,7 +16,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.provider.markdown.MarkDownProvider;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
@ -26,7 +26,7 @@ import butterknife.OnTouch;
|
||||
* Created by Kosh on 30 Nov 2016, 11:02 AM
|
||||
*/
|
||||
|
||||
public class CreateGistView extends BaseActivity<CreateGistMvp.View, CreateGistPresenter> implements CreateGistMvp.View {
|
||||
public class CreateGistActivity extends BaseActivity<CreateGistMvp.View, CreateGistPresenter> implements CreateGistMvp.View {
|
||||
|
||||
@BindView(R.id.description) TextInputLayout description;
|
||||
@BindView(R.id.fileName) TextInputLayout fileName;
|
||||
@ -88,7 +88,7 @@ public class CreateGistView extends BaseActivity<CreateGistMvp.View, CreateGistP
|
||||
|
||||
@OnTouch(R.id.fileContent) boolean onTouch(MotionEvent event) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
Intent intent = new Intent(this, EditorView.class);
|
||||
Intent intent = new Intent(this, EditorActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, InputHelper.toString(savedText))
|
||||
.put(BundleConstant.EXTRA_TYPE, BundleConstant.ExtraTYpe.FOR_RESULT_EXTRA)
|
||||
@ -25,7 +25,7 @@ import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.provider.tasks.git.GithubActionService;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.gists.gist.comments.GistCommentsView;
|
||||
import com.fastaccess.ui.modules.gists.gist.comments.GistCommentsFragment;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ForegroundImageView;
|
||||
@ -39,7 +39,7 @@ import butterknife.OnClick;
|
||||
* Created by Kosh on 12 Nov 2016, 12:18 PM
|
||||
*/
|
||||
|
||||
public class GistView extends BaseActivity<GistMvp.View, GistPresenter>
|
||||
public class GistActivity extends BaseActivity<GistMvp.View, GistPresenter>
|
||||
implements GistMvp.View {
|
||||
|
||||
@BindView(R.id.avatarLayout) AvatarLayout avatarLayout;
|
||||
@ -56,14 +56,14 @@ public class GistView extends BaseActivity<GistMvp.View, GistPresenter>
|
||||
private int iconColor;
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String gistId) {
|
||||
Intent intent = new Intent(context, GistView.class);
|
||||
Intent intent = new Intent(context, GistActivity.class);
|
||||
intent.putExtras(Bundler.start().put(BundleConstant.EXTRA, gistId).end());
|
||||
return intent;
|
||||
}
|
||||
|
||||
@OnClick(R.id.fab) void onAddComment() {
|
||||
if (pager != null && pager.getAdapter() != null) {
|
||||
GistCommentsView view = (GistCommentsView) pager.getAdapter().instantiateItem(pager, 1);
|
||||
GistCommentsFragment view = (GistCommentsFragment) pager.getAdapter().instantiateItem(pager, 1);
|
||||
if (view != null) {
|
||||
view.onStartNewComment();
|
||||
}
|
||||
@ -19,7 +19,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.CommentsAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
@ -34,7 +34,7 @@ import static com.fastaccess.helper.BundleConstant.ExtraTYpe.NEW_GIST_COMMENT_EX
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class GistCommentsView extends BaseFragment<GistCommentsMvp.View, GistCommentsPresenter> implements GistCommentsMvp.View {
|
||||
public class GistCommentsFragment extends BaseFragment<GistCommentsMvp.View, GistCommentsPresenter> implements GistCommentsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -44,8 +44,8 @@ public class GistCommentsView extends BaseFragment<GistCommentsMvp.View, GistCom
|
||||
private CommentsAdapter adapter;
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
|
||||
public static GistCommentsView newInstance(@NonNull String gistId) {
|
||||
GistCommentsView view = new GistCommentsView();
|
||||
public static GistCommentsFragment newInstance(@NonNull String gistId) {
|
||||
GistCommentsFragment view = new GistCommentsFragment();
|
||||
view.setArguments(Bundler.start().put("gistId", gistId).end());
|
||||
return view;
|
||||
}
|
||||
@ -121,7 +121,7 @@ public class GistCommentsView extends BaseFragment<GistCommentsMvp.View, GistCom
|
||||
}
|
||||
|
||||
@Override public void onEditComment(@NonNull Comment item) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, gistId)
|
||||
@ -134,7 +134,7 @@ public class GistCommentsView extends BaseFragment<GistCommentsMvp.View, GistCom
|
||||
}
|
||||
|
||||
@Override public void onStartNewComment() {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, gistId)
|
||||
@ -155,7 +155,7 @@ public class GistCommentsView extends BaseFragment<GistCommentsMvp.View, GistCom
|
||||
}
|
||||
|
||||
@Override public void onTagUser(@NonNull User user) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, gistId)
|
||||
@ -18,7 +18,7 @@ import com.fastaccess.provider.markdown.MarkDownProvider;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.adapter.GistFilesAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerView;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
@ -32,15 +32,15 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 13 Nov 2016, 1:36 PM
|
||||
*/
|
||||
|
||||
public class GistFilesListView extends BaseFragment<GistFilesListMvp.View, GistFilesListPresenter> implements
|
||||
public class GistFilesListFragment extends BaseFragment<GistFilesListMvp.View, GistFilesListPresenter> implements
|
||||
GistFilesListMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
|
||||
public static GistFilesListView newInstance(@NonNull GithubFileModel gistsModel) {
|
||||
GistFilesListView view = new GistFilesListView();
|
||||
public static GistFilesListFragment newInstance(@NonNull GithubFileModel gistsModel) {
|
||||
GistFilesListFragment view = new GistFilesListFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.ITEM, gistsModel).end());
|
||||
return view;
|
||||
}
|
||||
@ -85,7 +85,7 @@ public class GistFilesListView extends BaseFragment<GistFilesListMvp.View, GistF
|
||||
Bundler.start().put(BundleConstant.YES_NO_EXTRA, true).put(BundleConstant.EXTRA, item.getRawUrl()).end())
|
||||
.show(getChildFragmentManager(), "MessageDialogView");
|
||||
} else {
|
||||
CodeViewerView.startActivity(getContext(), item.getRawUrl());
|
||||
CodeViewerActivity.startActivity(getContext(), item.getRawUrl());
|
||||
}
|
||||
} else {
|
||||
showErrorMessage(getString(R.string.no_url));
|
||||
@ -18,7 +18,7 @@ import com.fastaccess.helper.ActivityHelper;
|
||||
import com.fastaccess.helper.AnimHelper;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
@ -29,7 +29,7 @@ import es.dmoral.toasty.Toasty;
|
||||
* Created by Kosh on 08 Feb 2017, 9:10 PM
|
||||
*/
|
||||
|
||||
public class LoginView extends BaseActivity<LoginMvp.View, LoginPresenter> implements LoginMvp.View {
|
||||
public class LoginActivity extends BaseActivity<LoginMvp.View, LoginPresenter> implements LoginMvp.View {
|
||||
|
||||
|
||||
@BindView(R.id.usernameEditText) TextInputEditText usernameEditText;
|
||||
@ -101,7 +101,7 @@ public class LoginView extends BaseActivity<LoginMvp.View, LoginPresenter> imple
|
||||
|
||||
@Override public void onSuccessfullyLoggedIn() {
|
||||
hideProgress();
|
||||
Intent intent = new Intent(this, MainView.class);
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
finishAffinity();
|
||||
@ -21,22 +21,22 @@ import com.fastaccess.helper.PrefGetter;
|
||||
import com.fastaccess.helper.TypeFaceHelper;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.feeds.FeedsView;
|
||||
import com.fastaccess.ui.modules.feeds.FeedsFragment;
|
||||
import com.fastaccess.ui.modules.gists.GistsListActivity;
|
||||
import com.fastaccess.ui.modules.main.donation.DonationView;
|
||||
import com.fastaccess.ui.modules.notification.NotificationActivityView;
|
||||
import com.fastaccess.ui.modules.notification.NotificationActivity;
|
||||
import com.fastaccess.ui.modules.pinned.PinnedReposActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.search.SearchView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.search.SearchActivity;
|
||||
import com.fastaccess.ui.modules.settings.SettingsBottomSheetDialog;
|
||||
import com.fastaccess.ui.modules.user.UserPagerView;
|
||||
import com.fastaccess.ui.modules.user.UserPagerActivity;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import icepick.State;
|
||||
import it.sephiroth.android.library.bottomnavigation.BottomNavigation;
|
||||
|
||||
public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implements MainMvp.View {
|
||||
public class MainActivity extends BaseActivity<MainMvp.View, MainPresenter> implements MainMvp.View {
|
||||
|
||||
@State @MainMvp.NavigationType int navType = MainMvp.FEEDS;
|
||||
@BindView(R.id.bottomNavigation) BottomNavigation bottomNavigation;
|
||||
@ -96,11 +96,11 @@ public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implemen
|
||||
onOpenDrawer();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.search) {
|
||||
startActivity(new Intent(this, SearchView.class));
|
||||
startActivity(new Intent(this, SearchActivity.class));
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.notifications) {
|
||||
ViewHelper.tintDrawable(item.setIcon(R.drawable.ic_notifications_none).getIcon(), ViewHelper.getIconColor(this));
|
||||
startActivity(new Intent(this, NotificationActivityView.class));
|
||||
startActivity(new Intent(this, NotificationActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
@ -141,7 +141,7 @@ public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implemen
|
||||
}
|
||||
|
||||
@Override public void openFasHubRepo() {
|
||||
startActivity(RepoPagerView.createIntent(this, "FastHub", "k0shk0sh"));
|
||||
startActivity(RepoPagerActivity.createIntent(this, "FastHub", "k0shk0sh"));
|
||||
}
|
||||
|
||||
@Override public void onOpenSettings() {
|
||||
@ -168,7 +168,7 @@ public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implemen
|
||||
}
|
||||
|
||||
@Override public void onOpenProfile() {
|
||||
startActivity(UserPagerView.createIntent(this, Login.getUser().getLogin()));
|
||||
startActivity(UserPagerActivity.createIntent(this, Login.getUser().getLogin()));
|
||||
}
|
||||
|
||||
private void showHideFab() {
|
||||
@ -204,7 +204,7 @@ public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implemen
|
||||
if (savedInstanceState == null) {
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.container, FeedsView.newInstance(), FeedsView.TAG)
|
||||
.replace(R.id.container, FeedsFragment.newInstance(), FeedsFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
setupNavigationView(navigationView);
|
||||
@ -10,9 +10,9 @@ import android.view.MenuItem;
|
||||
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.feeds.FeedsView;
|
||||
import com.fastaccess.ui.modules.feeds.FeedsFragment;
|
||||
import com.fastaccess.ui.modules.main.issues.pager.MyIssuesPagerView;
|
||||
import com.fastaccess.ui.modules.main.pullrequests.pager.MyPullsPagerView;
|
||||
import com.fastaccess.ui.modules.main.pullrequests.pager.MyPullsPagerFragment;
|
||||
|
||||
import static com.fastaccess.helper.ActivityHelper.getVisibleFragment;
|
||||
import static com.fastaccess.helper.AppHelper.getFragmentByTag;
|
||||
@ -30,20 +30,20 @@ class MainPresenter extends BasePresenter<MainMvp.View> implements MainMvp.Prese
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Override public void onModuleChanged(@NonNull FragmentManager fragmentManager, @MainMvp.NavigationType int type) {
|
||||
Fragment currentVisible = getVisibleFragment(fragmentManager);
|
||||
FeedsView homeView = (FeedsView) getFragmentByTag(fragmentManager, FeedsView.TAG);
|
||||
MyPullsPagerView pullRequestView = (MyPullsPagerView) getFragmentByTag(fragmentManager, MyPullsPagerView.TAG);
|
||||
FeedsFragment homeView = (FeedsFragment) getFragmentByTag(fragmentManager, FeedsFragment.TAG);
|
||||
MyPullsPagerFragment pullRequestView = (MyPullsPagerFragment) getFragmentByTag(fragmentManager, MyPullsPagerFragment.TAG);
|
||||
MyIssuesPagerView issuesView = (MyIssuesPagerView) getFragmentByTag(fragmentManager, MyIssuesPagerView.TAG);
|
||||
switch (type) {
|
||||
case MainMvp.FEEDS:
|
||||
if (homeView == null) {
|
||||
onAddAndHide(fragmentManager, FeedsView.newInstance(), currentVisible);
|
||||
onAddAndHide(fragmentManager, FeedsFragment.newInstance(), currentVisible);
|
||||
} else {
|
||||
onShowHideFragment(fragmentManager, homeView, currentVisible);
|
||||
}
|
||||
break;
|
||||
case MainMvp.PULL_REQUESTS:
|
||||
if (pullRequestView == null) {
|
||||
onAddAndHide(fragmentManager, MyPullsPagerView.newInstance(), currentVisible);
|
||||
onAddAndHide(fragmentManager, MyPullsPagerFragment.newInstance(), currentVisible);
|
||||
} else {
|
||||
onShowHideFragment(fragmentManager, pullRequestView, currentVisible);
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import com.fastaccess.data.dao.types.IssueState;
|
||||
import com.fastaccess.provider.rest.RepoQueryProvider;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -29,7 +29,7 @@ public class MyIssuesPresenter extends BasePresenter<MyIssuesMvp.View> implement
|
||||
@Override public void onItemClick(int position, View v, Issue item) {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForIssue(item.getHtmlUrl());
|
||||
if (parser != null) {
|
||||
v.getContext().startActivity(IssuePagerView.createIntent(v.getContext(), parser.getRepoId(),
|
||||
v.getContext().startActivity(IssuePagerActivity.createIntent(v.getContext(), parser.getRepoId(),
|
||||
parser.getLogin(), parser.getNumber(), true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 25 Mar 2017, 11:48 PM
|
||||
*/
|
||||
|
||||
public class MyPullRequestView extends BaseFragment<MyPullRequestsMvp.View, MyPullRequestsPresenter> implements MyPullRequestsMvp.View {
|
||||
public class MyPullRequestFragment extends BaseFragment<MyPullRequestsMvp.View, MyPullRequestsPresenter> implements MyPullRequestsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -34,8 +34,8 @@ public class MyPullRequestView extends BaseFragment<MyPullRequestsMvp.View, MyPu
|
||||
private PullRequestAdapter adapter;
|
||||
private RepoPagerMvp.TabsBadgeListener tabsBadgeListener;
|
||||
|
||||
public static MyPullRequestView newInstance(@NonNull IssueState issueState) {
|
||||
MyPullRequestView view = new MyPullRequestView();
|
||||
public static MyPullRequestFragment newInstance(@NonNull IssueState issueState) {
|
||||
MyPullRequestFragment view = new MyPullRequestFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, issueState).end());
|
||||
return view;
|
||||
}
|
||||
@ -12,7 +12,7 @@ import com.fastaccess.data.dao.types.IssueState;
|
||||
import com.fastaccess.provider.rest.RepoQueryProvider;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -30,7 +30,7 @@ public class MyPullRequestsPresenter extends BasePresenter<MyPullRequestsMvp.Vie
|
||||
@Override public void onItemClick(int position, View v, PullRequest item) {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForPullRequest(item.getHtmlUrl());
|
||||
if (parser != null) {
|
||||
Intent intent = PullRequestPagerView.createIntent(v.getContext(), parser.getRepoId(), parser.getLogin(), parser.getNumber(), true);
|
||||
Intent intent = PullRequestPagerActivity.createIntent(v.getContext(), parser.getRepoId(), parser.getLogin(), parser.getNumber(), true);
|
||||
v.getContext().startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,17 +22,17 @@ import icepick.State;
|
||||
* Created by Kosh on 26 Mar 2017, 12:14 AM
|
||||
*/
|
||||
|
||||
public class MyPullsPagerView extends BaseFragment<MyPullsPagerMvp.View, MyPullsPagerPresenter> implements MyPullsPagerMvp.View {
|
||||
public class MyPullsPagerFragment extends BaseFragment<MyPullsPagerMvp.View, MyPullsPagerPresenter> implements MyPullsPagerMvp.View {
|
||||
|
||||
public static final String TAG = MyPullsPagerView.class.getSimpleName();
|
||||
public static final String TAG = MyPullsPagerFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
@State int openCount = -1;
|
||||
@State int closeCount = -1;
|
||||
|
||||
public static MyPullsPagerView newInstance() {
|
||||
return new MyPullsPagerView();
|
||||
public static MyPullsPagerFragment newInstance() {
|
||||
return new MyPullsPagerFragment();
|
||||
}
|
||||
|
||||
@Override protected int fragmentLayout() {
|
||||
@ -10,7 +10,7 @@ import com.fastaccess.helper.AppHelper;
|
||||
import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
@ -20,9 +20,9 @@ import butterknife.OnItemSelected;
|
||||
* Created by Kosh on 27 Feb 2017, 12:36 PM
|
||||
*/
|
||||
|
||||
public class NotificationActivityView extends BaseActivity {
|
||||
public class NotificationActivity extends BaseActivity {
|
||||
|
||||
private NotificationsView notificationsView;
|
||||
private NotificationsFragment notificationsFragment;
|
||||
private boolean userSelectedSpinner = false;
|
||||
|
||||
@Override protected int layout() {
|
||||
@ -63,15 +63,15 @@ public class NotificationActivityView extends BaseActivity {
|
||||
@Override public void onBackPressed() {
|
||||
Logger.e(isTaskRoot());
|
||||
if (isTaskRoot()) {
|
||||
startActivity(new Intent(this, MainView.class));
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
public NotificationsView getNotificationsView() {
|
||||
if (notificationsView == null) {
|
||||
notificationsView = (NotificationsView) getSupportFragmentManager().findFragmentById(R.id.notificationFragment);
|
||||
public NotificationsFragment getNotificationsView() {
|
||||
if (notificationsFragment == null) {
|
||||
notificationsFragment = (NotificationsFragment) getSupportFragmentManager().findFragmentById(R.id.notificationFragment);
|
||||
}
|
||||
return notificationsView;
|
||||
return notificationsFragment;
|
||||
}
|
||||
}
|
||||
@ -33,7 +33,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 20 Feb 2017, 8:50 PM
|
||||
*/
|
||||
|
||||
public class NotificationsView extends BaseFragment<NotificationsMvp.View, NotificationsPresenter>
|
||||
public class NotificationsFragment extends BaseFragment<NotificationsMvp.View, NotificationsPresenter>
|
||||
implements NotificationsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -43,8 +43,8 @@ public class NotificationsView extends BaseFragment<NotificationsMvp.View, Notif
|
||||
private OnLoadMore onLoadMore;
|
||||
private NotificationsAdapter adapter;
|
||||
|
||||
public static NotificationsView newInstance() {
|
||||
return new NotificationsView();
|
||||
public static NotificationsFragment newInstance() {
|
||||
return new NotificationsFragment();
|
||||
}
|
||||
|
||||
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@ -9,7 +9,7 @@ import android.widget.Toast;
|
||||
import com.fastaccess.R;
|
||||
import com.fastaccess.data.dao.model.Login;
|
||||
import com.fastaccess.provider.scheme.StackBuilderSchemeParser;
|
||||
import com.fastaccess.ui.modules.login.LoginView;
|
||||
import com.fastaccess.ui.modules.login.LoginActivity;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 09 Dec 2016, 12:31 PM
|
||||
@ -21,7 +21,7 @@ public class LinksParserActivity extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (Login.getUser() == null) {
|
||||
Toast.makeText(this, R.string.please_login, Toast.LENGTH_SHORT).show();
|
||||
startActivity(new Intent(this, LoginView.class));
|
||||
startActivity(new Intent(this, LoginActivity.class));
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class PinnedReposActivity extends BaseActivity {
|
||||
if (savedInstanceState == null) {
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.fragmentContainer, PinnedReposView.newInstance(), PinnedReposView.TAG)
|
||||
.replace(R.id.fragmentContainer, PinnedReposFragment.newInstance(), PinnedReposFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,17 +22,17 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 25 Mar 2017, 8:04 PM
|
||||
*/
|
||||
|
||||
public class PinnedReposView extends BaseFragment<PinnedReposMvp.View, PinnedReposPresenter> implements PinnedReposMvp.View {
|
||||
public class PinnedReposFragment extends BaseFragment<PinnedReposMvp.View, PinnedReposPresenter> implements PinnedReposMvp.View {
|
||||
|
||||
public static final String TAG = PinnedReposView.class.getSimpleName();
|
||||
public static final String TAG = PinnedReposFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) AppbarRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
private PinnedReposAdapter adapter;
|
||||
|
||||
public static PinnedReposView newInstance() {
|
||||
return new PinnedReposView();
|
||||
public static PinnedReposFragment newInstance() {
|
||||
return new PinnedReposFragment();
|
||||
}
|
||||
|
||||
@Override public void onNotifyAdapter() {
|
||||
@ -7,7 +7,7 @@ import com.fastaccess.data.dao.NameParser;
|
||||
import com.fastaccess.data.dao.model.AbstractPinnedRepos;
|
||||
import com.fastaccess.data.dao.model.PinnedRepos;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -41,7 +41,7 @@ public class PinnedReposPresenter extends BasePresenter<PinnedReposMvp.View> imp
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, PinnedRepos item) {
|
||||
RepoPagerView.startRepoPager(v.getContext(), new NameParser(item.getPinnedRepo().getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), new NameParser(item.getPinnedRepo().getHtmlUrl()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, PinnedRepos item) {
|
||||
|
||||
@ -20,15 +20,15 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 8:00 AM
|
||||
*/
|
||||
|
||||
public class ProfilePagerView extends BaseFragment<ProfilePagerMvp.View, ProfilePagerPresenter> implements ProfilePagerMvp.View {
|
||||
public class ProfilePagerFragment extends BaseFragment<ProfilePagerMvp.View, ProfilePagerPresenter> implements ProfilePagerMvp.View {
|
||||
|
||||
public static final String TAG = ProfilePagerView.class.getSimpleName();
|
||||
public static final String TAG = ProfilePagerFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
|
||||
public static ProfilePagerView newInstance(@NonNull String login) {
|
||||
ProfilePagerView profileView = new ProfilePagerView();
|
||||
public static ProfilePagerFragment newInstance(@NonNull String login) {
|
||||
ProfilePagerFragment profileView = new ProfilePagerFragment();
|
||||
profileView.setArguments(Bundler.start().put(BundleConstant.EXTRA, login).end());
|
||||
return profileView;
|
||||
}
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class ProfileFollowersView extends BaseFragment<ProfileFollowersMvp.View, ProfileFollowersPresenter> implements ProfileFollowersMvp.View {
|
||||
public class ProfileFollowersFragment extends BaseFragment<ProfileFollowersMvp.View, ProfileFollowersPresenter> implements ProfileFollowersMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class ProfileFollowersView extends BaseFragment<ProfileFollowersMvp.View,
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private UsersAdapter adapter;
|
||||
|
||||
public static ProfileFollowersView newInstance(@NonNull String username) {
|
||||
ProfileFollowersView view = new ProfileFollowersView();
|
||||
public static ProfileFollowersFragment newInstance(@NonNull String username) {
|
||||
ProfileFollowersFragment view = new ProfileFollowersFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class ProfileFollowingView extends BaseFragment<ProfileFollowingMvp.View, ProfileFollowingPresenter> implements ProfileFollowingMvp.View {
|
||||
public class ProfileFollowingFragment extends BaseFragment<ProfileFollowingMvp.View, ProfileFollowingPresenter> implements ProfileFollowingMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class ProfileFollowingView extends BaseFragment<ProfileFollowingMvp.View,
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private UsersAdapter adapter;
|
||||
|
||||
public static ProfileFollowingView newInstance(@NonNull String username) {
|
||||
ProfileFollowingView view = new ProfileFollowingView();
|
||||
public static ProfileFollowingFragment newInstance(@NonNull String username) {
|
||||
ProfileFollowingFragment view = new ProfileFollowingFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -16,7 +16,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.GistsAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistView;
|
||||
import com.fastaccess.ui.modules.gists.gist.GistActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -26,7 +26,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class ProfileGistsView extends BaseFragment<ProfileGistsMvp.View, ProfileGistsPresenter> implements ProfileGistsMvp.View {
|
||||
public class ProfileGistsFragment extends BaseFragment<ProfileGistsMvp.View, ProfileGistsPresenter> implements ProfileGistsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -35,8 +35,8 @@ public class ProfileGistsView extends BaseFragment<ProfileGistsMvp.View, Profile
|
||||
private GistsAdapter adapter;
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
|
||||
public static ProfileGistsView newInstance(@NonNull String login) {
|
||||
ProfileGistsView view = new ProfileGistsView();
|
||||
public static ProfileGistsFragment newInstance(@NonNull String login) {
|
||||
ProfileGistsFragment view = new ProfileGistsFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, login).end());
|
||||
return view;
|
||||
}
|
||||
@ -111,7 +111,7 @@ public class ProfileGistsView extends BaseFragment<ProfileGistsMvp.View, Profile
|
||||
}
|
||||
|
||||
@Override public void onStartGistView(@NonNull String gistId) {
|
||||
startActivityForResult(GistView.createIntent(getContext(), gistId), BundleConstant.REQUEST_CODE);
|
||||
startActivityForResult(GistActivity.createIntent(getContext(), gistId), BundleConstant.REQUEST_CODE);
|
||||
}
|
||||
|
||||
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
@ -24,7 +24,7 @@ import icepick.State;
|
||||
* Created by Kosh on 04 Apr 2017, 10:47 AM
|
||||
*/
|
||||
|
||||
public class OrgProfileOverviewView extends BaseFragment<OrgProfileOverviewMvp.View, OrgProfileOverviewPresenter>
|
||||
public class OrgProfileOverviewFragment extends BaseFragment<OrgProfileOverviewMvp.View, OrgProfileOverviewPresenter>
|
||||
implements OrgProfileOverviewMvp.View {
|
||||
|
||||
@BindView(R.id.avatarLayout) AvatarLayout avatarLayout;
|
||||
@ -38,8 +38,8 @@ public class OrgProfileOverviewView extends BaseFragment<OrgProfileOverviewMvp.V
|
||||
|
||||
@State User userModel;
|
||||
|
||||
public static OrgProfileOverviewView newInstance(@NonNull String login) {
|
||||
OrgProfileOverviewView view = new OrgProfileOverviewView();
|
||||
public static OrgProfileOverviewFragment newInstance(@NonNull String login) {
|
||||
OrgProfileOverviewFragment view = new OrgProfileOverviewFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, login).end());
|
||||
return view;
|
||||
}
|
||||
@ -33,7 +33,7 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class OrgFeedsView extends BaseFragment<OrgFeedsMvp.View, OrgFeedsPresenter> implements OrgFeedsMvp.View {
|
||||
public class OrgFeedsFragment extends BaseFragment<OrgFeedsMvp.View, OrgFeedsPresenter> implements OrgFeedsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -41,8 +41,8 @@ public class OrgFeedsView extends BaseFragment<OrgFeedsMvp.View, OrgFeedsPresent
|
||||
private FeedsAdapter adapter;
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
|
||||
public static OrgFeedsView newInstance(@NonNull String org) {
|
||||
OrgFeedsView view = new OrgFeedsView();
|
||||
public static OrgFeedsFragment newInstance(@NonNull String org) {
|
||||
OrgFeedsFragment view = new OrgFeedsFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, org).end());
|
||||
return view;
|
||||
}
|
||||
@ -17,7 +17,7 @@ import com.fastaccess.data.dao.types.EventsType;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.provider.scheme.SchemeParser;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -90,7 +90,7 @@ class OrgFeedsPresenter extends BasePresenter<OrgFeedsMvp.View> implements OrgFe
|
||||
@Override public void onItemClick(int position, View v, Event item) {
|
||||
if (item.getType() == EventsType.ForkEvent) {
|
||||
NameParser parser = new NameParser(item.getPayload().getForkee().getHtmlUrl());
|
||||
RepoPagerView.startRepoPager(v.getContext(), parser);
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), parser);
|
||||
} else {
|
||||
PayloadModel payloadModel = item.getPayload();
|
||||
if (payloadModel != null) {
|
||||
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class OrgMembersView extends BaseFragment<OrgMembersMvp.View, OrgMembersPresenter> implements OrgMembersMvp.View {
|
||||
public class OrgMembersFragment extends BaseFragment<OrgMembersMvp.View, OrgMembersPresenter> implements OrgMembersMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class OrgMembersView extends BaseFragment<OrgMembersMvp.View, OrgMembersP
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private UsersAdapter adapter;
|
||||
|
||||
public static OrgMembersView newInstance(@NonNull String username) {
|
||||
OrgMembersView view = new OrgMembersView();
|
||||
public static OrgMembersFragment newInstance(@NonNull String username) {
|
||||
OrgMembersFragment view = new OrgMembersFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class OrgReposView extends BaseFragment<OrgReposMvp.View, OrgReposPresenter> implements OrgReposMvp.View {
|
||||
public class OrgReposFragment extends BaseFragment<OrgReposMvp.View, OrgReposPresenter> implements OrgReposMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class OrgReposView extends BaseFragment<OrgReposMvp.View, OrgReposPresent
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private ReposAdapter adapter;
|
||||
|
||||
public static OrgReposView newInstance(@NonNull String username) {
|
||||
OrgReposView view = new OrgReposView();
|
||||
public static OrgReposFragment newInstance(@NonNull String username) {
|
||||
OrgReposFragment view = new OrgReposFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -9,7 +9,7 @@ import com.fastaccess.data.dao.model.Repo;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -90,7 +90,7 @@ class OrgReposPresenter extends BasePresenter<OrgReposMvp.View> implements OrgRe
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Repo item) {
|
||||
RepoPagerView.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Repo item) {
|
||||
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class OrgTeamView extends BaseFragment<OrgTeamMvp.View, OrgTeamPresenter> implements OrgTeamMvp.View {
|
||||
public class OrgTeamFragment extends BaseFragment<OrgTeamMvp.View, OrgTeamPresenter> implements OrgTeamMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class OrgTeamView extends BaseFragment<OrgTeamMvp.View, OrgTeamPresenter>
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private TeamsAdapter adapter;
|
||||
|
||||
public static OrgTeamView newInstance(@NonNull String username) {
|
||||
OrgTeamView view = new OrgTeamView();
|
||||
public static OrgTeamFragment newInstance(@NonNull String username) {
|
||||
OrgTeamFragment view = new OrgTeamFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -7,7 +7,7 @@ import android.view.View;
|
||||
import com.fastaccess.data.dao.TeamsModel;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.TeamPagerView;
|
||||
import com.fastaccess.ui.modules.profile.org.teams.details.TeamPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -80,7 +80,7 @@ class OrgTeamPresenter extends BasePresenter<OrgTeamMvp.View> implements OrgTeam
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, TeamsModel item) {
|
||||
TeamPagerView.startActivity(v.getContext(), item.getId(), item.getName());
|
||||
TeamPagerActivity.startActivity(v.getContext(), item.getId(), item.getName());
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, TeamsModel item) {
|
||||
|
||||
@ -25,7 +25,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Apr 2017, 10:08 PM
|
||||
*/
|
||||
|
||||
public class TeamPagerView extends BaseActivity {
|
||||
public class TeamPagerActivity extends BaseActivity {
|
||||
|
||||
@State long id;
|
||||
@State String name;
|
||||
@ -34,7 +34,7 @@ public class TeamPagerView extends BaseActivity {
|
||||
@BindView(R.id.tabbedPager) ViewPagerView pager;
|
||||
|
||||
public static void startActivity(@NonNull Context context, long id, @NonNull String name) {
|
||||
Intent intent = new Intent(context, TeamPagerView.class);
|
||||
Intent intent = new Intent(context, TeamPagerActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, id)
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class TeamMembersView extends BaseFragment<TeamMembersMvp.View, TeamMembersPresenter> implements TeamMembersMvp.View {
|
||||
public class TeamMembersFragment extends BaseFragment<TeamMembersMvp.View, TeamMembersPresenter> implements TeamMembersMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class TeamMembersView extends BaseFragment<TeamMembersMvp.View, TeamMembe
|
||||
private OnLoadMore<Long> onLoadMore;
|
||||
private UsersAdapter adapter;
|
||||
|
||||
public static TeamMembersView newInstance(@NonNull Long id) {
|
||||
TeamMembersView view = new TeamMembersView();
|
||||
public static TeamMembersFragment newInstance(@NonNull Long id) {
|
||||
TeamMembersFragment view = new TeamMembersFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, id).end());
|
||||
return view;
|
||||
}
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class TeamReposView extends BaseFragment<TeamReposMvp.View, TeamReposPresenter> implements TeamReposMvp.View {
|
||||
public class TeamReposFragment extends BaseFragment<TeamReposMvp.View, TeamReposPresenter> implements TeamReposMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class TeamReposView extends BaseFragment<TeamReposMvp.View, TeamReposPres
|
||||
private OnLoadMore<Long> onLoadMore;
|
||||
private ReposAdapter adapter;
|
||||
|
||||
public static TeamReposView newInstance(long id) {
|
||||
TeamReposView view = new TeamReposView();
|
||||
public static TeamReposFragment newInstance(long id) {
|
||||
TeamReposFragment view = new TeamReposFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, id).end());
|
||||
return view;
|
||||
}
|
||||
@ -8,7 +8,7 @@ import com.fastaccess.data.dao.NameParser;
|
||||
import com.fastaccess.data.dao.model.Repo;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -75,7 +75,7 @@ class TeamReposPresenter extends BasePresenter<TeamReposMvp.View> implements Tea
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Repo item) {
|
||||
RepoPagerView.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Repo item) {
|
||||
|
||||
@ -29,7 +29,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 9:16 AM
|
||||
*/
|
||||
|
||||
public class ProfileOverviewView extends BaseFragment<ProfileOverviewMvp.View, ProfileOverviewPresenter> implements ProfileOverviewMvp.View {
|
||||
public class ProfileOverviewFragment extends BaseFragment<ProfileOverviewMvp.View, ProfileOverviewPresenter> implements ProfileOverviewMvp.View {
|
||||
|
||||
@BindView(R.id.username) FontTextView username;
|
||||
@BindView(R.id.description) FontTextView description;
|
||||
@ -47,8 +47,8 @@ public class ProfileOverviewView extends BaseFragment<ProfileOverviewMvp.View, P
|
||||
|
||||
private ProfilePagerMvp.View profileCallback;
|
||||
|
||||
public static ProfileOverviewView newInstance(@NonNull String login) {
|
||||
ProfileOverviewView view = new ProfileOverviewView();
|
||||
public static ProfileOverviewFragment newInstance(@NonNull String login) {
|
||||
ProfileOverviewFragment view = new ProfileOverviewFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, login).end());
|
||||
return view;
|
||||
}
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class ProfileReposView extends BaseFragment<ProfileReposMvp.View, ProfileReposPresenter> implements ProfileReposMvp.View {
|
||||
public class ProfileReposFragment extends BaseFragment<ProfileReposMvp.View, ProfileReposPresenter> implements ProfileReposMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class ProfileReposView extends BaseFragment<ProfileReposMvp.View, Profile
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private ReposAdapter adapter;
|
||||
|
||||
public static ProfileReposView newInstance(@NonNull String username) {
|
||||
ProfileReposView view = new ProfileReposView();
|
||||
public static ProfileReposFragment newInstance(@NonNull String username) {
|
||||
ProfileReposFragment view = new ProfileReposFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -11,7 +11,7 @@ import com.fastaccess.data.dao.model.Repo;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -98,7 +98,7 @@ class ProfileReposPresenter extends BasePresenter<ProfileReposMvp.View> implemen
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Repo item) {
|
||||
RepoPagerView.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Repo item) {
|
||||
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class ProfileStarredView extends BaseFragment<ProfileStarredMvp.View, ProfileStarredPresenter> implements ProfileStarredMvp.View {
|
||||
public class ProfileStarredFragment extends BaseFragment<ProfileStarredMvp.View, ProfileStarredPresenter> implements ProfileStarredMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class ProfileStarredView extends BaseFragment<ProfileStarredMvp.View, Pro
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private ReposAdapter adapter;
|
||||
|
||||
public static ProfileStarredView newInstance(@NonNull String username) {
|
||||
ProfileStarredView view = new ProfileStarredView();
|
||||
public static ProfileStarredFragment newInstance(@NonNull String username) {
|
||||
ProfileStarredFragment view = new ProfileStarredFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.EXTRA, username).end());
|
||||
return view;
|
||||
}
|
||||
@ -10,7 +10,7 @@ import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -92,7 +92,7 @@ class ProfileStarredPresenter extends BasePresenter<ProfileStarredMvp.View> impl
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Repo item) {
|
||||
RepoPagerView.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(v.getContext(), new NameParser(item.getHtmlUrl()));
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Repo item) {
|
||||
|
||||
@ -33,12 +33,12 @@ import com.fastaccess.helper.TypeFaceHelper;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.provider.tasks.git.GithubActionService;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.filter.chooser.FilterChooserDialogView;
|
||||
import com.fastaccess.ui.modules.filter.issues.FilterIssuesActivityView;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.repos.code.RepoCodePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.RepoPullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.filter.chooser.FilterChooserBottomSheetDialog;
|
||||
import com.fastaccess.ui.modules.filter.issues.FilterIssuesActivity;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.RepoCodePagerFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.RepoPullRequestPagerFragment;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ForegroundImageView;
|
||||
@ -59,7 +59,7 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 09 Dec 2016, 4:17 PM
|
||||
*/
|
||||
|
||||
public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPresenter> implements RepoPagerMvp.View {
|
||||
public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPagerPresenter> implements RepoPagerMvp.View {
|
||||
|
||||
@BindView(R.id.avatarLayout) AvatarLayout avatarLayout;
|
||||
@BindView(R.id.headerTitle) FontTextView title;
|
||||
@ -104,7 +104,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String repoId, @NonNull String login,
|
||||
@RepoPagerMvp.RepoNavigationType int navType) {
|
||||
Intent intent = new Intent(context, RepoPagerView.class);
|
||||
Intent intent = new Intent(context, RepoPagerActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA_TWO, login)
|
||||
@ -134,12 +134,12 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
|
||||
@OnClick(R.id.fab) void onFabClicked() {
|
||||
if (navType == RepoPagerMvp.ISSUES) {
|
||||
FilterChooserDialogView.newInstance().show(getSupportFragmentManager(), "FilterChooserDialogView");
|
||||
FilterChooserBottomSheetDialog.newInstance().show(getSupportFragmentManager(), "FilterChooserBottomSheetDialog");
|
||||
} else if (navType == RepoPagerMvp.PULL_REQUEST) {
|
||||
RepoPullRequestPagerView pullRequestPagerView = (RepoPullRequestPagerView) AppHelper.getFragmentByTag(getSupportFragmentManager(),
|
||||
RepoPullRequestPagerView.TAG);
|
||||
RepoPullRequestPagerFragment pullRequestPagerView = (RepoPullRequestPagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(),
|
||||
RepoPullRequestPagerFragment.TAG);
|
||||
if (pullRequestPagerView != null) {
|
||||
FilterIssuesActivityView.startActivity(this, getPresenter().login(), getPresenter().repoId(), false,
|
||||
FilterIssuesActivity.startActivity(this, getPresenter().login(), getPresenter().repoId(), false,
|
||||
pullRequestPagerView.getCurrentItem() == 0);
|
||||
}
|
||||
} else {
|
||||
@ -292,7 +292,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
@Override public void onHidePrompt(MotionEvent event, boolean tappedTarget) {}
|
||||
|
||||
@Override public void onHidePromptComplete() {
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerView.this)
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerActivity.this)
|
||||
.setTarget(starRepoLayout)
|
||||
.setPrimaryText(R.string.star)
|
||||
.setSecondaryText(R.string.star_hint)
|
||||
@ -301,14 +301,14 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
@Override public void onHidePrompt(MotionEvent event, boolean tappedTarget) {}
|
||||
|
||||
@Override public void onHidePromptComplete() {
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerView.this)
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerActivity.this)
|
||||
.setTarget(forkRepoLayout)
|
||||
.setPrimaryText(R.string.fork)
|
||||
.setSecondaryText(R.string.fork_repo_hint)
|
||||
.setCaptureTouchEventOutsidePrompt(true)
|
||||
.setOnHidePromptListener(new MaterialTapTargetPrompt.OnHidePromptListener() {
|
||||
@Override public void onHidePrompt(MotionEvent event, boolean tappedTarget) {
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerView.this)
|
||||
new MaterialTapTargetPrompt.Builder(RepoPagerActivity.this)
|
||||
.setTarget(pinLayout)
|
||||
.setPrimaryText(R.string.pin)
|
||||
.setSecondaryText(R.string.pin_repo_hint)
|
||||
@ -407,7 +407,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
|
||||
@Override public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
startActivity(new Intent(this, MainView.class));
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
finish();
|
||||
} else if (item.getItemId() == R.id.share) {
|
||||
if (getPresenter().getRepo() != null) ActivityHelper.shareUrl(this, getPresenter().getRepo().getHtmlUrl());
|
||||
@ -415,7 +415,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
} else if (item.getItemId() == R.id.originalRepo) {
|
||||
if (getPresenter().getRepo() != null && getPresenter().getRepo().getParent() != null) {
|
||||
Repo parent = getPresenter().getRepo().getParent();
|
||||
RepoPagerView.startRepoPager(this, new NameParser(parent.getHtmlUrl()));
|
||||
RepoPagerActivity.startRepoPager(this, new NameParser(parent.getHtmlUrl()));
|
||||
}
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.deleteRepo) {
|
||||
@ -445,7 +445,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
|
||||
@Override public void onBackPressed() {
|
||||
if (navType == RepoPagerMvp.CODE) {
|
||||
RepoCodePagerView codePagerView = (RepoCodePagerView) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoCodePagerView.TAG);
|
||||
RepoCodePagerFragment codePagerView = (RepoCodePagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoCodePagerFragment.TAG);
|
||||
if (codePagerView != null) {
|
||||
if (codePagerView.canPressBack()) {
|
||||
super.onBackPressed();
|
||||
@ -459,7 +459,7 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
}
|
||||
|
||||
@Override public void onAddSelected() {
|
||||
RepoIssuesPagerView pagerView = (RepoIssuesPagerView) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoIssuesPagerView.TAG);
|
||||
RepoIssuesPagerFragment pagerView = (RepoIssuesPagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoIssuesPagerFragment.TAG);
|
||||
if (pagerView != null) {
|
||||
pagerView.onAddIssue();
|
||||
}
|
||||
@ -467,11 +467,11 @@ public class RepoPagerView extends BaseActivity<RepoPagerMvp.View, RepoPagerPres
|
||||
|
||||
@Override public void onSearchSelected() {
|
||||
boolean isOpen = true;
|
||||
RepoIssuesPagerView pagerView = (RepoIssuesPagerView) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoIssuesPagerView.TAG);
|
||||
RepoIssuesPagerFragment pagerView = (RepoIssuesPagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), RepoIssuesPagerFragment.TAG);
|
||||
if (pagerView != null) {
|
||||
isOpen = pagerView.getCurrentItem() == 0;
|
||||
}
|
||||
FilterIssuesActivityView.startActivity(this, getPresenter().login(), getPresenter().repoId(), true, isOpen);
|
||||
FilterIssuesActivity.startActivity(this, getPresenter().login(), getPresenter().repoId(), true, isOpen);
|
||||
}
|
||||
|
||||
private void showHideFab() {
|
||||
@ -16,9 +16,9 @@ import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.code.RepoCodePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.RepoPullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.RepoCodePagerFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.RepoPullRequestPagerFragment;
|
||||
|
||||
import static com.fastaccess.helper.ActivityHelper.getVisibleFragment;
|
||||
|
||||
@ -176,10 +176,10 @@ class RepoPagerPresenter extends BasePresenter<RepoPagerMvp.View> implements Rep
|
||||
|
||||
@Override public void onModuleChanged(@NonNull FragmentManager fragmentManager, @RepoPagerMvp.RepoNavigationType int type) {
|
||||
Fragment currentVisible = getVisibleFragment(fragmentManager);
|
||||
RepoCodePagerView codePagerView = (RepoCodePagerView) AppHelper.getFragmentByTag(fragmentManager, RepoCodePagerView.TAG);
|
||||
RepoIssuesPagerView repoIssuesPagerView = (RepoIssuesPagerView) AppHelper.getFragmentByTag(fragmentManager, RepoIssuesPagerView.TAG);
|
||||
RepoPullRequestPagerView pullRequestPagerView = (RepoPullRequestPagerView) AppHelper.getFragmentByTag(fragmentManager,
|
||||
RepoPullRequestPagerView.TAG);
|
||||
RepoCodePagerFragment codePagerView = (RepoCodePagerFragment) AppHelper.getFragmentByTag(fragmentManager, RepoCodePagerFragment.TAG);
|
||||
RepoIssuesPagerFragment repoIssuesPagerView = (RepoIssuesPagerFragment) AppHelper.getFragmentByTag(fragmentManager, RepoIssuesPagerFragment.TAG);
|
||||
RepoPullRequestPagerFragment pullRequestPagerView = (RepoPullRequestPagerFragment) AppHelper.getFragmentByTag(fragmentManager,
|
||||
RepoPullRequestPagerFragment.TAG);
|
||||
if (getRepo() == null) {
|
||||
sendToView(RepoPagerMvp.View::onFinishActivity);
|
||||
return;
|
||||
@ -189,7 +189,7 @@ class RepoPagerPresenter extends BasePresenter<RepoPagerMvp.View> implements Rep
|
||||
switch (type) {
|
||||
case RepoPagerMvp.CODE:
|
||||
if (codePagerView == null) {
|
||||
onAddAndHide(fragmentManager, RepoCodePagerView.newInstance(repoId(), login(),
|
||||
onAddAndHide(fragmentManager, RepoCodePagerFragment.newInstance(repoId(), login(),
|
||||
getRepo().getUrl(), getRepo().getDefaultBranch()), currentVisible);
|
||||
} else {
|
||||
onShowHideFragment(fragmentManager, codePagerView, currentVisible);
|
||||
@ -201,14 +201,14 @@ class RepoPagerPresenter extends BasePresenter<RepoPagerMvp.View> implements Rep
|
||||
return;
|
||||
}
|
||||
if (repoIssuesPagerView == null) {
|
||||
onAddAndHide(fragmentManager, RepoIssuesPagerView.newInstance(repoId(), login()), currentVisible);
|
||||
onAddAndHide(fragmentManager, RepoIssuesPagerFragment.newInstance(repoId(), login()), currentVisible);
|
||||
} else {
|
||||
onShowHideFragment(fragmentManager, repoIssuesPagerView, currentVisible);
|
||||
}
|
||||
break;
|
||||
case RepoPagerMvp.PULL_REQUEST:
|
||||
if (pullRequestPagerView == null) {
|
||||
onAddAndHide(fragmentManager, RepoPullRequestPagerView.newInstance(repoId(), login()), currentVisible);
|
||||
onAddAndHide(fragmentManager, RepoPullRequestPagerFragment.newInstance(repoId(), login()), currentVisible);
|
||||
} else {
|
||||
onShowHideFragment(fragmentManager, pullRequestPagerView, currentVisible);
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathView;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathFragment;
|
||||
import com.fastaccess.ui.widgets.SpannableBuilder;
|
||||
import com.fastaccess.ui.widgets.ViewPagerView;
|
||||
|
||||
@ -26,15 +26,15 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 31 Dec 2016, 1:36 AM
|
||||
*/
|
||||
|
||||
public class RepoCodePagerView extends BaseFragment<RepoCodePagerMvp.View, RepoCodePagerPresenter> implements RepoCodePagerMvp.View {
|
||||
public static final String TAG = RepoCodePagerView.class.getSimpleName();
|
||||
public class RepoCodePagerFragment extends BaseFragment<RepoCodePagerMvp.View, RepoCodePagerPresenter> implements RepoCodePagerMvp.View {
|
||||
public static final String TAG = RepoCodePagerFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
|
||||
public static RepoCodePagerView newInstance(@NonNull String repoId, @NonNull String login,
|
||||
@NonNull String htmlLink, @NonNull String defaultBranch) {
|
||||
RepoCodePagerView view = new RepoCodePagerView();
|
||||
public static RepoCodePagerFragment newInstance(@NonNull String repoId, @NonNull String login,
|
||||
@NonNull String htmlLink, @NonNull String defaultBranch) {
|
||||
RepoCodePagerFragment view = new RepoCodePagerFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -70,12 +70,12 @@ public class RepoCodePagerView extends BaseFragment<RepoCodePagerMvp.View, RepoC
|
||||
|
||||
@Override public boolean canPressBack() {
|
||||
if (pager.getCurrentItem() != 1) return true;
|
||||
RepoFilePathView pathView = (RepoFilePathView) pager.getAdapter().instantiateItem(pager, 1);
|
||||
RepoFilePathFragment pathView = (RepoFilePathFragment) pager.getAdapter().instantiateItem(pager, 1);
|
||||
return pathView == null || pathView.canPressBack();
|
||||
}
|
||||
|
||||
@Override public void onBackPressed() {
|
||||
RepoFilePathView pathView = (RepoFilePathView) pager.getAdapter().instantiateItem(pager, 1);
|
||||
RepoFilePathFragment pathView = (RepoFilePathFragment) pager.getAdapter().instantiateItem(pager, 1);
|
||||
if (pathView != null) {
|
||||
pathView.onBackPressed();
|
||||
}
|
||||
@ -33,7 +33,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoCommitsView extends BaseFragment<RepoCommitsMvp.View, RepoCommitsPresenter> implements RepoCommitsMvp.View {
|
||||
public class RepoCommitsFragment extends BaseFragment<RepoCommitsMvp.View, RepoCommitsPresenter> implements RepoCommitsMvp.View {
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
@ -45,8 +45,8 @@ public class RepoCommitsView extends BaseFragment<RepoCommitsMvp.View, RepoCommi
|
||||
private RepoPagerMvp.View repoCallback;
|
||||
private RepoPagerMvp.TabsBadgeListener tabsBadgeListener;
|
||||
|
||||
public static RepoCommitsView newInstance(@NonNull String repoId, @NonNull String login, @NonNull String branch) {
|
||||
RepoCommitsView view = new RepoCommitsView();
|
||||
public static RepoCommitsFragment newInstance(@NonNull String repoId, @NonNull String login, @NonNull String branch) {
|
||||
RepoCommitsFragment view = new RepoCommitsFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -16,7 +16,7 @@ import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -173,7 +173,7 @@ class RepoCommitsPresenter extends BasePresenter<RepoCommitsMvp.View> implements
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Commit item) {
|
||||
CommitPagerView.createIntentForOffline(v.getContext(), item);
|
||||
CommitPagerActivity.createIntentForOffline(v.getContext(), item);
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Commit item) {
|
||||
|
||||
@ -26,8 +26,8 @@ import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.provider.scheme.SchemeParser;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.comments.CommitCommentsView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.comments.CommitCommentsFragments;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ViewPagerView;
|
||||
@ -42,7 +42,7 @@ import butterknife.OnClick;
|
||||
* Created by Kosh on 10 Dec 2016, 9:23 AM
|
||||
*/
|
||||
|
||||
public class CommitPagerView extends BaseActivity<CommitPagerMvp.View, CommitPagerPresenter> implements CommitPagerMvp.View {
|
||||
public class CommitPagerActivity extends BaseActivity<CommitPagerMvp.View, CommitPagerPresenter> implements CommitPagerMvp.View {
|
||||
|
||||
@BindView(R.id.avatarLayout) AvatarLayout avatarLayout;
|
||||
@BindView(R.id.headerTitle) FontTextView title;
|
||||
@ -63,7 +63,7 @@ public class CommitPagerView extends BaseActivity<CommitPagerMvp.View, CommitPag
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String repoId, @NonNull String login,
|
||||
@NonNull String sha, boolean showRepoBtn) {
|
||||
Intent intent = new Intent(context, CommitPagerView.class);
|
||||
Intent intent = new Intent(context, CommitPagerActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.ID, sha)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -85,7 +85,7 @@ public class CommitPagerView extends BaseActivity<CommitPagerMvp.View, CommitPag
|
||||
}
|
||||
|
||||
@OnClick(R.id.fab) void onAddComment() {
|
||||
CommitCommentsView view = (CommitCommentsView) pager.getAdapter().instantiateItem(pager, 1);
|
||||
CommitCommentsFragments view = (CommitCommentsFragments) pager.getAdapter().instantiateItem(pager, 1);
|
||||
if (view != null) {
|
||||
view.onStartNewComment();
|
||||
}
|
||||
@ -180,7 +180,7 @@ public class CommitPagerView extends BaseActivity<CommitPagerMvp.View, CommitPag
|
||||
NameParser nameParser = new NameParser("");
|
||||
nameParser.setName(getPresenter().getRepoId());
|
||||
nameParser.setUsername(getPresenter().getLogin());
|
||||
RepoPagerView.startRepoPager(this, nameParser);
|
||||
RepoPagerActivity.startRepoPager(this, nameParser);
|
||||
finish();
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.CommentsAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
@ -31,7 +31,7 @@ import icepick.State;
|
||||
* Created by Kosh on 11 Nov 2016, 12:36 PM
|
||||
*/
|
||||
|
||||
public class CommitCommentsView extends BaseFragment<CommitCommentsMvp.View, CommitCommentsPresenter> implements CommitCommentsMvp.View {
|
||||
public class CommitCommentsFragments extends BaseFragment<CommitCommentsMvp.View, CommitCommentsPresenter> implements CommitCommentsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -41,8 +41,8 @@ public class CommitCommentsView extends BaseFragment<CommitCommentsMvp.View, Com
|
||||
private CommentsAdapter adapter;
|
||||
private OnLoadMore onLoadMore;
|
||||
|
||||
public static CommitCommentsView newInstance(@NonNull String login, @NonNull String repoId, @NonNull String sha) {
|
||||
CommitCommentsView view = new CommitCommentsView();
|
||||
public static CommitCommentsFragments newInstance(@NonNull String login, @NonNull String repoId, @NonNull String sha) {
|
||||
CommitCommentsFragments view = new CommitCommentsFragments();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -116,7 +116,7 @@ public class CommitCommentsView extends BaseFragment<CommitCommentsMvp.View, Com
|
||||
}
|
||||
|
||||
@Override public void onEditComment(@NonNull Comment item) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -144,7 +144,7 @@ public class CommitCommentsView extends BaseFragment<CommitCommentsMvp.View, Com
|
||||
}
|
||||
|
||||
@Override public void onTagUser(@Nullable User user) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -24,7 +24,7 @@ import icepick.State;
|
||||
* Created by Kosh on 15 Feb 2017, 10:16 PM
|
||||
*/
|
||||
|
||||
public class CommitFilesView extends BaseFragment<CommitFilesMvp.View, CommitFilesPresenter> implements CommitFilesMvp.View {
|
||||
public class CommitFilesFragment extends BaseFragment<CommitFilesMvp.View, CommitFilesPresenter> implements CommitFilesMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) AppbarRefreshLayout refresh;
|
||||
@ -33,8 +33,8 @@ public class CommitFilesView extends BaseFragment<CommitFilesMvp.View, CommitFil
|
||||
|
||||
private CommitFilesAdapter adapter;
|
||||
|
||||
public static CommitFilesView newInstance(@NonNull String sha, @Nullable CommitFileListModel commitFileModels) {//TODO fix this
|
||||
CommitFilesView view = new CommitFilesView();
|
||||
public static CommitFilesFragment newInstance(@NonNull String sha, @Nullable CommitFileListModel commitFileModels) {//TODO fix this
|
||||
CommitFilesFragment view = new CommitFilesFragment();
|
||||
if (commitFileModels != null) {
|
||||
CommitFilesSingleton.getInstance().putFiles(sha, commitFileModels);
|
||||
}
|
||||
@ -13,10 +13,10 @@ import java.util.Map;
|
||||
*/
|
||||
|
||||
class CommitFilesSingleton {
|
||||
private static final CommitFilesSingleton ourInstance = new CommitFilesSingleton();
|
||||
private static final CommitFilesSingleton SINGLETON = new CommitFilesSingleton();
|
||||
|
||||
static CommitFilesSingleton getInstance() {
|
||||
return ourInstance;
|
||||
return SINGLETON;
|
||||
}
|
||||
|
||||
private Map<String, CommitFileListModel> files = new Hashtable<>();
|
||||
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoContributorsView extends BaseFragment<RepoContributorsMvp.View, RepoContributorsPresenter> implements RepoContributorsMvp.View {
|
||||
public class RepoContributorsFragment extends BaseFragment<RepoContributorsMvp.View, RepoContributorsPresenter> implements RepoContributorsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@ -30,8 +30,8 @@ public class RepoContributorsView extends BaseFragment<RepoContributorsMvp.View,
|
||||
private OnLoadMore onLoadMore;
|
||||
private UsersAdapter adapter;
|
||||
|
||||
public static RepoContributorsView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoContributorsView view = new RepoContributorsView();
|
||||
public static RepoContributorsFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoContributorsFragment view = new RepoContributorsFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -23,8 +23,8 @@ import com.fastaccess.provider.markdown.MarkDownProvider;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.adapter.RepoFilesAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerView;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathView;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathFragment;
|
||||
import com.fastaccess.ui.widgets.AppbarRefreshLayout;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
@ -37,13 +37,13 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 18 Feb 2017, 2:10 AM
|
||||
*/
|
||||
|
||||
public class RepoFilesView extends BaseFragment<RepoFilesMvp.View, RepoFilesPresenter> implements RepoFilesMvp.View {
|
||||
public class RepoFilesFragment extends BaseFragment<RepoFilesMvp.View, RepoFilesPresenter> implements RepoFilesMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) AppbarRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
private RepoFilesAdapter adapter;
|
||||
private RepoFilePathView parentFragment;
|
||||
private RepoFilePathFragment parentFragment;
|
||||
|
||||
@Override public void onNotifyAdapter() {
|
||||
hideProgress();
|
||||
@ -66,7 +66,7 @@ public class RepoFilesView extends BaseFragment<RepoFilesMvp.View, RepoFilesPres
|
||||
.end())
|
||||
.show(getChildFragmentManager(), "MessageDialogView");
|
||||
} else {
|
||||
CodeViewerView.startActivity(getContext(), url);
|
||||
CodeViewerActivity.startActivity(getContext(), url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -181,9 +181,9 @@ public class RepoFilesView extends BaseFragment<RepoFilesMvp.View, RepoFilesPres
|
||||
stateLayout.showReload(adapter.getItemCount());
|
||||
}
|
||||
|
||||
private RepoFilePathView getParent() {
|
||||
private RepoFilePathFragment getParent() {
|
||||
if (parentFragment == null) {
|
||||
parentFragment = (RepoFilePathView) getParentFragment();
|
||||
parentFragment = (RepoFilePathFragment) getParentFragment();
|
||||
}
|
||||
return parentFragment;
|
||||
}
|
||||
@ -16,9 +16,9 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.main.MainView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathView;
|
||||
import com.fastaccess.ui.modules.main.MainActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.code.files.paths.RepoFilePathFragment;
|
||||
|
||||
import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
|
||||
@ -59,7 +59,7 @@ public class RepoFilesActivity extends BaseActivity {
|
||||
.end());
|
||||
return intent;
|
||||
}
|
||||
return new Intent(context, MainView.class);
|
||||
return new Intent(context, MainActivity.class);
|
||||
}
|
||||
|
||||
@Override protected int layout() {
|
||||
@ -91,7 +91,7 @@ public class RepoFilesActivity extends BaseActivity {
|
||||
String path = bundle.getString(BundleConstant.EXTRA_TWO);
|
||||
String defaultBranch = Objects.toString(bundle.getString(BundleConstant.EXTRA_THREE), "master");
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragmentContainer, RepoFilePathView.newInstance(login, repoId, path, defaultBranch, true), "RepoFilePathView")
|
||||
.add(R.id.fragmentContainer, RepoFilePathFragment.newInstance(login, repoId, path, defaultBranch, true), "RepoFilePathFragment")
|
||||
.commit();
|
||||
}
|
||||
setTitle(String.format("%s/%s", login, repoId));
|
||||
@ -99,7 +99,7 @@ public class RepoFilesActivity extends BaseActivity {
|
||||
|
||||
@Override public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
startActivity(RepoPagerView.createIntent(this, repoId, login));
|
||||
startActivity(RepoPagerActivity.createIntent(this, repoId, login));
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class RepoFilesActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
@Override public void onBackPressed() {
|
||||
RepoFilePathView filePathView = (RepoFilePathView) AppHelper.getFragmentByTag(getSupportFragmentManager(), "RepoFilePathView");
|
||||
RepoFilePathFragment filePathView = (RepoFilePathFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), "RepoFilePathFragment");
|
||||
if (filePathView != null) {
|
||||
if (filePathView.canPressBack()) {
|
||||
super.onBackPressed();
|
||||
|
||||
@ -24,7 +24,7 @@ import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.adapter.BranchesAdapter;
|
||||
import com.fastaccess.ui.adapter.RepoFilePathsAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.code.files.RepoFilesView;
|
||||
import com.fastaccess.ui.modules.repos.code.files.RepoFilesFragment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -38,7 +38,7 @@ import icepick.State;
|
||||
* Created by Kosh on 18 Feb 2017, 2:10 AM
|
||||
*/
|
||||
|
||||
public class RepoFilePathView extends BaseFragment<RepoFilePathMvp.View, RepoFilePathPresenter> implements RepoFilePathMvp.View {
|
||||
public class RepoFilePathFragment extends BaseFragment<RepoFilePathMvp.View, RepoFilePathPresenter> implements RepoFilePathMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) RecyclerView recycler;
|
||||
@BindView(R.id.toParentFolder) View toParentFolder;
|
||||
@ -48,17 +48,17 @@ public class RepoFilePathView extends BaseFragment<RepoFilePathMvp.View, RepoFil
|
||||
@State String ref;
|
||||
|
||||
private RepoFilePathsAdapter adapter;
|
||||
private RepoFilesView repoFilesView;
|
||||
private RepoFilesFragment repoFilesView;
|
||||
private boolean canSelectSpinner;
|
||||
|
||||
public static RepoFilePathView newInstance(@NonNull String login, @NonNull String repoId, @Nullable String path, @NonNull String defaultBranch) {
|
||||
public static RepoFilePathFragment newInstance(@NonNull String login, @NonNull String repoId, @Nullable String path, @NonNull String defaultBranch) {
|
||||
return newInstance(login, repoId, path, defaultBranch, false);
|
||||
}
|
||||
|
||||
public static RepoFilePathView newInstance(@NonNull String login, @NonNull String repoId,
|
||||
@Nullable String path, @NonNull String defaultBranch,
|
||||
boolean forceAppendPath) {
|
||||
RepoFilePathView view = new RepoFilePathView();
|
||||
public static RepoFilePathFragment newInstance(@NonNull String login, @NonNull String repoId,
|
||||
@Nullable String path, @NonNull String defaultBranch,
|
||||
boolean forceAppendPath) {
|
||||
RepoFilePathFragment view = new RepoFilePathFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -221,9 +221,9 @@ public class RepoFilePathView extends BaseFragment<RepoFilePathMvp.View, RepoFil
|
||||
if (isSafe() && getRepoFilesView() != null) getRepoFilesView().onHiddenChanged(!isVisibleToUser);
|
||||
}
|
||||
|
||||
@NonNull public RepoFilesView getRepoFilesView() {
|
||||
@NonNull public RepoFilesFragment getRepoFilesView() {
|
||||
if (repoFilesView == null) {
|
||||
repoFilesView = (RepoFilesView) getChildFragmentManager().findFragmentById(R.id.filesFragment);
|
||||
repoFilesView = (RepoFilesFragment) getChildFragmentManager().findFragmentById(R.id.filesFragment);
|
||||
}
|
||||
return repoFilesView;
|
||||
}
|
||||
@ -26,27 +26,27 @@ import icepick.State;
|
||||
* Created by Kosh on 28 Nov 2016, 9:27 PM
|
||||
*/
|
||||
|
||||
public class ViewerView extends BaseFragment<ViewerMvp.View, ViewerPresenter> implements ViewerMvp.View {
|
||||
public class ViewerFragment extends BaseFragment<ViewerMvp.View, ViewerPresenter> implements ViewerMvp.View {
|
||||
|
||||
public static final String TAG = ViewerView.class.getSimpleName();
|
||||
public static final String TAG = ViewerFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.webView) PrettifyWebView webView;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
@State boolean isWrap = PrefGetter.isWrapCode();
|
||||
|
||||
public static ViewerView newInstance(@NonNull String url) {
|
||||
public static ViewerFragment newInstance(@NonNull String url) {
|
||||
return newInstance(url, false);
|
||||
}
|
||||
|
||||
public static ViewerView newInstance(@NonNull String url, boolean isRepo) {
|
||||
public static ViewerFragment newInstance(@NonNull String url, boolean isRepo) {
|
||||
return newInstance(Bundler.start()
|
||||
.put(BundleConstant.ITEM, url)
|
||||
.put(BundleConstant.EXTRA, isRepo)
|
||||
.end());
|
||||
}
|
||||
|
||||
private static ViewerView newInstance(@NonNull Bundle bundle) {
|
||||
ViewerView fragmentView = new ViewerView();
|
||||
private static ViewerFragment newInstance(@NonNull Bundle bundle) {
|
||||
ViewerFragment fragmentView = new ViewerFragment();
|
||||
fragmentView.setArguments(bundle);
|
||||
return fragmentView;
|
||||
}
|
||||
@ -36,15 +36,15 @@ import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoReleasesView extends BaseFragment<RepoReleasesMvp.View, RepoReleasesPresenter> implements RepoReleasesMvp.View {
|
||||
public class RepoReleasesFragment extends BaseFragment<RepoReleasesMvp.View, RepoReleasesPresenter> implements RepoReleasesMvp.View {
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
private OnLoadMore onLoadMore;
|
||||
private ReleasesAdapter adapter;
|
||||
|
||||
public static RepoReleasesView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoReleasesView view = new RepoReleasesView();
|
||||
public static RepoReleasesFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoReleasesFragment view = new RepoReleasesFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -32,7 +32,7 @@ import icepick.State;
|
||||
* Created by Kosh on 22 Feb 2017, 7:23 PM
|
||||
*/
|
||||
|
||||
public class AssigneesView extends BaseDialogFragment<AssigneesMvp.View, AssigneesPresenter> implements AssigneesMvp.View {
|
||||
public class AssigneesDialogFragment extends BaseDialogFragment<AssigneesMvp.View, AssigneesPresenter> implements AssigneesMvp.View {
|
||||
|
||||
@BindView(R.id.title) FontTextView title;
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -56,8 +56,8 @@ public class AssigneesView extends BaseDialogFragment<AssigneesMvp.View, Assigne
|
||||
callback = null;
|
||||
}
|
||||
|
||||
public static AssigneesView newInstance(@NonNull List<User> models) {
|
||||
AssigneesView fragment = new AssigneesView();
|
||||
public static AssigneesDialogFragment newInstance(@NonNull List<User> models) {
|
||||
AssigneesDialogFragment fragment = new AssigneesDialogFragment();
|
||||
fragment.setArguments(Bundler.start().putParcelableArrayList(BundleConstant.ITEM, (ArrayList<? extends Parcelable>) models).end());
|
||||
return fragment;
|
||||
}
|
||||
@ -17,7 +17,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.ui.adapter.LabelsAdapter;
|
||||
import com.fastaccess.ui.base.BaseDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.create.CreateLableView;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.create.CreateLabelDialogFragment;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -35,7 +35,7 @@ import icepick.State;
|
||||
* Created by Kosh on 22 Feb 2017, 7:23 PM
|
||||
*/
|
||||
|
||||
public class LabelsView extends BaseDialogFragment<LabelsMvp.View, LabelsPresenter> implements LabelsMvp.View {
|
||||
public class LabelsDialogFragment extends BaseDialogFragment<LabelsMvp.View, LabelsPresenter> implements LabelsMvp.View {
|
||||
|
||||
@BindView(R.id.title) FontTextView title;
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -44,9 +44,9 @@ public class LabelsView extends BaseDialogFragment<LabelsMvp.View, LabelsPresent
|
||||
private LabelsAdapter adapter;
|
||||
private LabelsMvp.SelectedLabelsListener callback;
|
||||
|
||||
public static LabelsView newInstance(@NonNull List<LabelModel> models, @Nullable LabelListModel selectedLabels,
|
||||
@NonNull String repo, @NonNull String login) {
|
||||
LabelsView fragment = new LabelsView();
|
||||
public static LabelsDialogFragment newInstance(@NonNull List<LabelModel> models, @Nullable LabelListModel selectedLabels,
|
||||
@NonNull String repo, @NonNull String login) {
|
||||
LabelsDialogFragment fragment = new LabelsDialogFragment();
|
||||
fragment.setArguments(Bundler.start()
|
||||
.putParcelableArrayList(BundleConstant.ITEM, (ArrayList<? extends Parcelable>) models)
|
||||
.putParcelableArrayList(BundleConstant.EXTRA, selectedLabels)
|
||||
@ -60,7 +60,7 @@ public class LabelsView extends BaseDialogFragment<LabelsMvp.View, LabelsPresent
|
||||
String repo = getArguments().getString(BundleConstant.EXTRA_TWO);
|
||||
String login = getArguments().getString(BundleConstant.EXTRA_THREE);
|
||||
if (!InputHelper.isEmpty(repo) && !InputHelper.isEmpty(login)) {
|
||||
CreateLableView.newInstance(login, repo).show(getChildFragmentManager(), "CreateLableView");
|
||||
CreateLabelDialogFragment.newInstance(login, repo).show(getChildFragmentManager(), "CreateLabelDialogFragment");
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 02 Apr 2017, 5:38 PM
|
||||
*/
|
||||
|
||||
public class CreateLableView extends BaseDialogFragment<CreateLabelMvp.View, CreateLabelPresenter> implements CreateLabelMvp.View {
|
||||
public class CreateLabelDialogFragment extends BaseDialogFragment<CreateLabelMvp.View, CreateLabelPresenter> implements CreateLabelMvp.View {
|
||||
|
||||
@BindView(R.id.toolbar) Toolbar toolbar;
|
||||
@BindView(R.id.name) TextInputLayout name;
|
||||
@ -34,8 +34,8 @@ public class CreateLableView extends BaseDialogFragment<CreateLabelMvp.View, Cre
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
private LabelsMvp.View callback;
|
||||
|
||||
public static CreateLableView newInstance(@NonNull String login, @NonNull String repo) {
|
||||
CreateLableView fragment = new CreateLableView();
|
||||
public static CreateLabelDialogFragment newInstance(@NonNull String login, @NonNull String repo) {
|
||||
CreateLabelDialogFragment fragment = new CreateLabelDialogFragment();
|
||||
fragment.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repo)
|
||||
@ -16,7 +16,7 @@ import com.fastaccess.helper.BundleConstant;
|
||||
import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.ui.adapter.MilestonesAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.CreateMilestoneView;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.CreateMilestoneDialogFragment;
|
||||
import com.fastaccess.ui.widgets.AppbarRefreshLayout;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
@ -27,8 +27,8 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 04 Mar 2017, 9:45 PM
|
||||
*/
|
||||
|
||||
public class MilestoneView extends BaseFragment<MilestoneMvp.View, MilestonePresenter> implements MilestoneMvp.View {
|
||||
public static final String TAG = MilestoneView.class.getSimpleName();
|
||||
public class MilestoneDialogFragment extends BaseFragment<MilestoneMvp.View, MilestonePresenter> implements MilestoneMvp.View {
|
||||
public static final String TAG = MilestoneDialogFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.toolbar) Toolbar toolbar;
|
||||
@BindView(R.id.appbar) AppBarLayout appbar;
|
||||
@ -38,8 +38,8 @@ public class MilestoneView extends BaseFragment<MilestoneMvp.View, MilestonePres
|
||||
private MilestonesAdapter adapter;
|
||||
private MilestoneMvp.OnMilestoneSelected onMilestoneSelected;
|
||||
|
||||
public static MilestoneView newInstance(@NonNull String login, @NonNull String repo) {
|
||||
MilestoneView fragment = new MilestoneView();
|
||||
public static MilestoneDialogFragment newInstance(@NonNull String login, @NonNull String repo) {
|
||||
MilestoneDialogFragment fragment = new MilestoneDialogFragment();
|
||||
fragment.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repo)
|
||||
@ -138,8 +138,8 @@ public class MilestoneView extends BaseFragment<MilestoneMvp.View, MilestonePres
|
||||
|
||||
private boolean onAddMilestone() {
|
||||
//noinspection ConstantConditions
|
||||
CreateMilestoneView.newInstance(getArguments().getString(BundleConstant.EXTRA), getArguments().getString(BundleConstant.ID))
|
||||
.show(getChildFragmentManager(), CreateMilestoneView.TAG);
|
||||
CreateMilestoneDialogFragment.newInstance(getArguments().getString(BundleConstant.EXTRA), getArguments().getString(BundleConstant.ID))
|
||||
.show(getChildFragmentManager(), CreateMilestoneDialogFragment.TAG);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -27,10 +27,10 @@ import butterknife.OnTouch;
|
||||
* Created by Kosh on 04 Mar 2017, 10:40 PM
|
||||
*/
|
||||
|
||||
public class CreateMilestoneView extends BaseDialogFragment<CreateMilestoneMvp.View, CreateMilestonePresenter>
|
||||
public class CreateMilestoneDialogFragment extends BaseDialogFragment<CreateMilestoneMvp.View, CreateMilestonePresenter>
|
||||
implements CreateMilestoneMvp.View, DatePickerCallback {
|
||||
|
||||
public static final String TAG = CreateMilestoneView.class.getSimpleName();
|
||||
public static final String TAG = CreateMilestoneDialogFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.toolbar) Toolbar toolbar;
|
||||
@BindView(R.id.title) TextInputLayout title;
|
||||
@ -39,8 +39,8 @@ public class CreateMilestoneView extends BaseDialogFragment<CreateMilestoneMvp.V
|
||||
|
||||
private CreateMilestoneMvp.OnMilestoneAdded onMilestoneAdded;
|
||||
|
||||
public static CreateMilestoneView newInstance(@NonNull String login, @NonNull String repo) {
|
||||
CreateMilestoneView fragment = new CreateMilestoneView();
|
||||
public static CreateMilestoneDialogFragment newInstance(@NonNull String login, @NonNull String repo) {
|
||||
CreateMilestoneDialogFragment fragment = new CreateMilestoneDialogFragment();
|
||||
fragment.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repo)
|
||||
@ -13,7 +13,6 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.ui.base.BaseDialogFragment;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.MilestoneMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.MilestoneView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerMvp;
|
||||
|
||||
@ -23,13 +22,13 @@ import net.grandcentrix.thirtyinch.TiPresenter;
|
||||
* Created by Kosh on 04 Mar 2017, 10:58 PM
|
||||
*/
|
||||
|
||||
public class MilestoneDialog extends BaseDialogFragment implements MilestoneMvp.OnMilestoneSelected {
|
||||
public class MilestoneDialogFragment extends BaseDialogFragment implements MilestoneMvp.OnMilestoneSelected {
|
||||
|
||||
private IssuePagerMvp.View issueCallback;
|
||||
private PullRequestPagerMvp.View pullRequestCallback;
|
||||
|
||||
public static MilestoneDialog newInstance(@NonNull String login, @NonNull String repo) {
|
||||
MilestoneDialog view = new MilestoneDialog();
|
||||
public static MilestoneDialogFragment newInstance(@NonNull String login, @NonNull String repo) {
|
||||
MilestoneDialogFragment view = new MilestoneDialogFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repo)
|
||||
@ -66,11 +65,11 @@ public class MilestoneDialog extends BaseDialogFragment implements MilestoneMvp.
|
||||
@Override protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
if (savedInstanceState == null) {
|
||||
Bundle bundle = getArguments();
|
||||
MilestoneView milestoneView = new MilestoneView();
|
||||
com.fastaccess.ui.modules.repos.extras.milestone.MilestoneDialogFragment milestoneView = new com.fastaccess.ui.modules.repos.extras.milestone.MilestoneDialogFragment();
|
||||
milestoneView.setArguments(bundle);
|
||||
getChildFragmentManager()
|
||||
.beginTransaction()
|
||||
.replace(R.id.singleContainer, milestoneView, MilestoneView.TAG)
|
||||
.replace(R.id.singleContainer, milestoneView, com.fastaccess.ui.modules.repos.extras.milestone.MilestoneDialogFragment.TAG)
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
@ -14,8 +14,8 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoClosedIssuesView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoOpenedIssuesView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoClosedIssuesFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.RepoOpenedIssuesFragment;
|
||||
import com.fastaccess.ui.widgets.SpannableBuilder;
|
||||
import com.fastaccess.ui.widgets.ViewPagerView;
|
||||
|
||||
@ -26,17 +26,17 @@ import icepick.State;
|
||||
* Created by Kosh on 31 Dec 2016, 1:36 AM
|
||||
*/
|
||||
|
||||
public class RepoIssuesPagerView extends BaseFragment<RepoIssuesPagerMvp.View, RepoIssuesPagerPresenter> implements RepoIssuesPagerMvp.View {
|
||||
public class RepoIssuesPagerFragment extends BaseFragment<RepoIssuesPagerMvp.View, RepoIssuesPagerPresenter> implements RepoIssuesPagerMvp.View {
|
||||
|
||||
|
||||
public static final String TAG = RepoIssuesPagerView.class.getSimpleName();
|
||||
public static final String TAG = RepoIssuesPagerFragment.class.getSimpleName();
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
@State int openCount = -1;
|
||||
@State int closeCount = -1;
|
||||
|
||||
public static RepoIssuesPagerView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoIssuesPagerView view = new RepoIssuesPagerView();
|
||||
public static RepoIssuesPagerFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoIssuesPagerFragment view = new RepoIssuesPagerFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -67,7 +67,7 @@ public class RepoIssuesPagerView extends BaseFragment<RepoIssuesPagerMvp.View, R
|
||||
|
||||
@Override public void onAddIssue() {
|
||||
if (pager.getCurrentItem() != 0) pager.setCurrentItem(0);
|
||||
RepoOpenedIssuesView repoOpenedIssuesView = (RepoOpenedIssuesView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
RepoOpenedIssuesFragment repoOpenedIssuesView = (RepoOpenedIssuesFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
repoOpenedIssuesView.onAddIssue();
|
||||
}
|
||||
|
||||
@ -75,10 +75,10 @@ public class RepoIssuesPagerView extends BaseFragment<RepoIssuesPagerMvp.View, R
|
||||
if (pager == null || pager.getAdapter() == null) return;
|
||||
if (!refresh) pager.setCurrentItem(index, true);
|
||||
if (index == 1 && refresh) {
|
||||
RepoClosedIssuesView closedIssues = (RepoClosedIssuesView) pager.getAdapter().instantiateItem(pager, 1);
|
||||
RepoClosedIssuesFragment closedIssues = (RepoClosedIssuesFragment) pager.getAdapter().instantiateItem(pager, 1);
|
||||
if (closedIssues != null) closedIssues.onRefresh();
|
||||
} else if (index == 0 && refresh) {
|
||||
RepoOpenedIssuesView openedIssues = (RepoOpenedIssuesView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
RepoOpenedIssuesFragment openedIssues = (RepoOpenedIssuesFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (openedIssues != null) openedIssues.onRefresh();
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ import com.fastaccess.helper.Bundler;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.provider.markdown.MarkDownProvider;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
@ -33,7 +33,7 @@ import icepick.State;
|
||||
* Created by Kosh on 19 Feb 2017, 12:33 PM
|
||||
*/
|
||||
|
||||
public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIssuePresenter> implements CreateIssueMvp.View {
|
||||
public class CreateIssueActivity extends BaseActivity<CreateIssueMvp.View, CreateIssuePresenter> implements CreateIssueMvp.View {
|
||||
|
||||
@BindView(R.id.title) TextInputLayout title;
|
||||
@BindView(R.id.description) FontTextView description;
|
||||
@ -48,7 +48,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
private CharSequence savedText;
|
||||
|
||||
public static void startForResult(@NonNull Fragment fragment, @NonNull String login, @NonNull String repoId) {
|
||||
Intent intent = new Intent(fragment.getContext(), CreateIssueView.class);
|
||||
Intent intent = new Intent(fragment.getContext(), CreateIssueActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -66,7 +66,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
public static void startForResult(@NonNull Activity activity, @NonNull String login, @NonNull String repoId,
|
||||
@Nullable Issue issueModel) {
|
||||
if (issueModel != null) {
|
||||
Intent intent = new Intent(activity, CreateIssueView.class);
|
||||
Intent intent = new Intent(activity, CreateIssueActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -84,7 +84,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
public static void startForResult(@NonNull Activity activity, @NonNull String login, @NonNull String repoId,
|
||||
@Nullable PullRequest pullRequestModel) {
|
||||
if (pullRequestModel != null) {
|
||||
Intent intent = new Intent(activity, CreateIssueView.class);
|
||||
Intent intent = new Intent(activity, CreateIssueActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -100,7 +100,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
}
|
||||
|
||||
@NonNull public static Intent getIntent(@NonNull Context context, @NonNull String login, @NonNull String repoId) {
|
||||
Intent intent = new Intent(context, CreateIssueView.class);
|
||||
Intent intent = new Intent(context, CreateIssueActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -112,7 +112,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
@NonNull public static Intent startForResult(@NonNull Activity activity) {
|
||||
String login = "k0shk0sh"; // FIXME: 23/02/2017 hardcoded
|
||||
String repoId = "FastHub";// FIXME: 23/02/2017 hardcoded
|
||||
Intent intent = new Intent(activity, CreateIssueView.class);
|
||||
Intent intent = new Intent(activity, CreateIssueActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
.put(BundleConstant.ID, repoId)
|
||||
@ -220,7 +220,7 @@ public class CreateIssueView extends BaseActivity<CreateIssueMvp.View, CreateIss
|
||||
savedText = AppHelper.getFastHubIssueTemplate();
|
||||
}
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
Intent intent = new Intent(this, EditorView.class);
|
||||
Intent intent = new Intent(this, EditorActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, InputHelper.toString(savedText))
|
||||
.put(BundleConstant.EXTRA_TYPE, BundleConstant.ExtraTYpe.FOR_RESULT_EXTRA)
|
||||
@ -20,7 +20,7 @@ import com.fastaccess.ui.adapter.IssuesAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -30,7 +30,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoClosedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoIssuesPresenter> implements RepoIssuesMvp.View {
|
||||
public class RepoClosedIssuesFragment extends BaseFragment<RepoIssuesMvp.View, RepoIssuesPresenter> implements RepoIssuesMvp.View {
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
@ -39,8 +39,8 @@ public class RepoClosedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoI
|
||||
private RepoPagerMvp.TabsBadgeListener tabsBadgeListener;
|
||||
private RepoIssuesPagerMvp.View pagerCallback;
|
||||
|
||||
public static RepoClosedIssuesView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoClosedIssuesView view = new RepoClosedIssuesView();
|
||||
public static RepoClosedIssuesFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoClosedIssuesFragment view = new RepoClosedIssuesFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -153,7 +153,7 @@ public class RepoClosedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoI
|
||||
}
|
||||
|
||||
@Override public void onOpenIssue(@NonNull PullsIssuesParser parser) {
|
||||
startActivityForResult(IssuePagerView.createIntent(getContext(), parser.getRepoId(), parser.getLogin(),
|
||||
startActivityForResult(IssuePagerActivity.createIntent(getContext(), parser.getRepoId(), parser.getLogin(),
|
||||
parser.getNumber()), RepoIssuesMvp.ISSUE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@ import com.fastaccess.ui.adapter.IssuesAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.issues.RepoIssuesPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -33,7 +33,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoOpenedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoIssuesPresenter> implements RepoIssuesMvp.View {
|
||||
public class RepoOpenedIssuesFragment extends BaseFragment<RepoIssuesMvp.View, RepoIssuesPresenter> implements RepoIssuesMvp.View {
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
@ -42,8 +42,8 @@ public class RepoOpenedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoI
|
||||
private RepoIssuesPagerMvp.View pagerCallback;
|
||||
private RepoPagerMvp.TabsBadgeListener tabsBadgeListener;
|
||||
|
||||
public static RepoOpenedIssuesView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoOpenedIssuesView view = new RepoOpenedIssuesView();
|
||||
public static RepoOpenedIssuesFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoOpenedIssuesFragment view = new RepoOpenedIssuesFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -156,7 +156,7 @@ public class RepoOpenedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoI
|
||||
String login = getPresenter().login();
|
||||
String repoId = getPresenter().repoId();
|
||||
if (!InputHelper.isEmpty(login) && !InputHelper.isEmpty(repoId)) {
|
||||
CreateIssueView.startForResult(this, login, repoId);
|
||||
CreateIssueActivity.startForResult(this, login, repoId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ public class RepoOpenedIssuesView extends BaseFragment<RepoIssuesMvp.View, RepoI
|
||||
}
|
||||
|
||||
@Override public void onOpenIssue(@NonNull PullsIssuesParser parser) {
|
||||
startActivityForResult(IssuePagerView.createIntent(getContext(), parser.getRepoId(), parser.getLogin(),
|
||||
startActivityForResult(IssuePagerActivity.createIntent(getContext(), parser.getRepoId(), parser.getLogin(),
|
||||
parser.getNumber()), RepoIssuesMvp.ISSUE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@ -28,12 +28,12 @@ import com.fastaccess.helper.ParseDateFormat;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesView;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsView;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialog;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.timeline.IssueTimelineView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.timeline.IssueTimelineFragment;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ForegroundImageView;
|
||||
@ -52,7 +52,7 @@ import icepick.State;
|
||||
* Created by Kosh on 10 Dec 2016, 9:23 AM
|
||||
*/
|
||||
|
||||
public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerPresenter> implements IssuePagerMvp.View {
|
||||
public class IssuePagerActivity extends BaseActivity<IssuePagerMvp.View, IssuePagerPresenter> implements IssuePagerMvp.View {
|
||||
|
||||
@BindView(R.id.startGist) ForegroundImageView startGist;
|
||||
@BindView(R.id.forkGist) ForegroundImageView forkGist;
|
||||
@ -73,7 +73,7 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
}
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String repoId, @NonNull String login, int number, boolean showToRepoBtn) {
|
||||
Intent intent = new Intent(context, IssuePagerView.class);
|
||||
Intent intent = new Intent(context, IssuePagerActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.ID, number)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -92,7 +92,7 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
|
||||
@OnClick(R.id.fab) void onAddComment() {
|
||||
if (pager != null && pager.getAdapter() != null) {
|
||||
IssueTimelineView view = (IssueTimelineView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
IssueTimelineFragment view = (IssueTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (view != null) {
|
||||
view.onStartNewComment();
|
||||
}
|
||||
@ -179,11 +179,11 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
getPresenter().onLoadLabels();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.edit) {
|
||||
CreateIssueView.startForResult(this, getPresenter().getLogin(), getPresenter().getRepoId(), getPresenter().getIssue());
|
||||
CreateIssueActivity.startForResult(this, getPresenter().getLogin(), getPresenter().getRepoId(), getPresenter().getIssue());
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.milestone) {
|
||||
MilestoneDialog.newInstance(getPresenter().getLogin(), getPresenter().getRepoId())
|
||||
.show(getSupportFragmentManager(), "MilestoneDialog");
|
||||
MilestoneDialogFragment.newInstance(getPresenter().getLogin(), getPresenter().getRepoId())
|
||||
.show(getSupportFragmentManager(), "MilestoneDialogFragment");
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.assignees) {
|
||||
getPresenter().onLoadAssignees();
|
||||
@ -284,14 +284,14 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
|
||||
@Override public void onLabelsRetrieved(@NonNull List<LabelModel> items) {
|
||||
hideProgress();
|
||||
LabelsView.newInstance(items, getPresenter().getIssue() != null ? getPresenter().getIssue().getLabels() : null,
|
||||
LabelsDialogFragment.newInstance(items, getPresenter().getIssue() != null ? getPresenter().getIssue().getLabels() : null,
|
||||
getPresenter().getRepoId(), getPresenter().getLogin())
|
||||
.show(getSupportFragmentManager(), "LabelsView");
|
||||
.show(getSupportFragmentManager(), "LabelsDialogFragment");
|
||||
}
|
||||
|
||||
@Override public void onUpdateTimeline() {
|
||||
showMessage(R.string.success, R.string.labels_added_successfully);
|
||||
IssueTimelineView issueDetailsView = (IssueTimelineView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
IssueTimelineFragment issueDetailsView = (IssueTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (issueDetailsView != null) {
|
||||
issueDetailsView.onRefresh();
|
||||
}
|
||||
@ -303,8 +303,8 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
|
||||
@Override public void onShowAssignees(@NonNull List<User> items) {
|
||||
hideProgress();
|
||||
AssigneesView.newInstance(items)
|
||||
.show(getSupportFragmentManager(), "AssigneesView");
|
||||
AssigneesDialogFragment.newInstance(items)
|
||||
.show(getSupportFragmentManager(), "AssigneesDialogFragment");
|
||||
}
|
||||
|
||||
@Override public void onMileStoneSelected(@NonNull MilestoneModel milestoneModel) {
|
||||
@ -330,7 +330,7 @@ public class IssuePagerView extends BaseActivity<IssuePagerMvp.View, IssuePagerP
|
||||
NameParser nameParser = new NameParser("");
|
||||
nameParser.setName(getPresenter().getRepoId());
|
||||
nameParser.setUsername(getPresenter().getLogin());
|
||||
RepoPagerView.startRepoPager(this, nameParser);
|
||||
RepoPagerActivity.startRepoPager(this, nameParser);
|
||||
finish();
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@ import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.IssuePullsTimelineAdapter;
|
||||
import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.repos.reactions.ReactionsDialogView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
import com.fastaccess.ui.modules.repos.reactions.ReactionsDialogFragment;
|
||||
import com.fastaccess.ui.widgets.AppbarRefreshLayout;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
@ -36,7 +36,7 @@ import icepick.State;
|
||||
* Created by Kosh on 31 Mar 2017, 7:35 PM
|
||||
*/
|
||||
|
||||
public class IssueTimelineView extends BaseFragment<IssueTimelineMvp.View, IssueTimelinePresenter> implements IssueTimelineMvp.View {
|
||||
public class IssueTimelineFragment extends BaseFragment<IssueTimelineMvp.View, IssueTimelinePresenter> implements IssueTimelineMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) AppbarRefreshLayout refresh;
|
||||
@ -45,8 +45,8 @@ public class IssueTimelineView extends BaseFragment<IssueTimelineMvp.View, Issue
|
||||
private OnLoadMore onLoadMore;
|
||||
@State SparseBooleanArrayParcelable sparseBooleanArray;
|
||||
|
||||
public static IssueTimelineView newInstance(@NonNull Issue issueModel) {
|
||||
IssueTimelineView view = new IssueTimelineView();
|
||||
public static IssueTimelineFragment newInstance(@NonNull Issue issueModel) {
|
||||
IssueTimelineFragment view = new IssueTimelineFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.ITEM, issueModel).end());//TODO fix this
|
||||
return view;
|
||||
}
|
||||
@ -116,7 +116,7 @@ public class IssueTimelineView extends BaseFragment<IssueTimelineMvp.View, Issue
|
||||
}
|
||||
|
||||
@Override public void onEditComment(@NonNull Comment item) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -144,7 +144,7 @@ public class IssueTimelineView extends BaseFragment<IssueTimelineMvp.View, Issue
|
||||
}
|
||||
|
||||
@Override public void onTagUser(@Nullable User user) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -159,7 +159,7 @@ public class IssueTimelineView extends BaseFragment<IssueTimelineMvp.View, Issue
|
||||
|
||||
@Override public void showReactionsPopup(@NonNull ReactionTypes type, @NonNull String login,
|
||||
@NonNull String repoId, long id) {
|
||||
ReactionsDialogView.newInstance(login, repoId, type, id).show(getChildFragmentManager(), "ReactionsDialogView");
|
||||
ReactionsDialogFragment.newInstance(login, repoId, type, id).show(getChildFragmentManager(), "ReactionsDialogFragment");
|
||||
}
|
||||
|
||||
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
@ -24,10 +24,10 @@ import icepick.State;
|
||||
* Created by Kosh on 31 Dec 2016, 1:36 AM
|
||||
*/
|
||||
|
||||
public class RepoPullRequestPagerView extends BaseFragment<RepoPullRequestPagerMvp.View, RepoPullRequestPagerPresenter> implements
|
||||
public class RepoPullRequestPagerFragment extends BaseFragment<RepoPullRequestPagerMvp.View, RepoPullRequestPagerPresenter> implements
|
||||
RepoPullRequestPagerMvp.View {
|
||||
|
||||
public static final String TAG = RepoPullRequestPagerView.class.getSimpleName();
|
||||
public static final String TAG = RepoPullRequestPagerFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.tabs) TabLayout tabs;
|
||||
@BindView(R.id.pager) ViewPagerView pager;
|
||||
@ -35,8 +35,8 @@ public class RepoPullRequestPagerView extends BaseFragment<RepoPullRequestPagerM
|
||||
@State int closeCount = -1;
|
||||
|
||||
|
||||
public static RepoPullRequestPagerView newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoPullRequestPagerView view = new RepoPullRequestPagerView();
|
||||
public static RepoPullRequestPagerFragment newInstance(@NonNull String repoId, @NonNull String login) {
|
||||
RepoPullRequestPagerFragment view = new RepoPullRequestPagerFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -19,7 +19,7 @@ import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.PullRequestAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -29,7 +29,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class RepoPullRequestView extends BaseFragment<RepoPullRequestMvp.View, RepoPullRequestPresenter> implements RepoPullRequestMvp.View {
|
||||
public class RepoPullRequestFragment extends BaseFragment<RepoPullRequestMvp.View, RepoPullRequestPresenter> implements RepoPullRequestMvp.View {
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@BindView(R.id.refresh) SwipeRefreshLayout refresh;
|
||||
@BindView(R.id.stateLayout) StateLayout stateLayout;
|
||||
@ -37,8 +37,8 @@ public class RepoPullRequestView extends BaseFragment<RepoPullRequestMvp.View, R
|
||||
private PullRequestAdapter adapter;
|
||||
private RepoPagerMvp.TabsBadgeListener tabsBadgeListener;
|
||||
|
||||
public static RepoPullRequestView newInstance(@NonNull String repoId, @NonNull String login, @NonNull IssueState issueState) {
|
||||
RepoPullRequestView view = new RepoPullRequestView();
|
||||
public static RepoPullRequestFragment newInstance(@NonNull String repoId, @NonNull String login, @NonNull IssueState issueState) {
|
||||
RepoPullRequestFragment view = new RepoPullRequestFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -141,7 +141,7 @@ public class RepoPullRequestView extends BaseFragment<RepoPullRequestMvp.View, R
|
||||
}
|
||||
|
||||
@Override public void onOpenPullRequest(@NonNull PullsIssuesParser parser) {
|
||||
Intent intent = PullRequestPagerView.createIntent(getContext(), parser.getRepoId(), parser.getLogin(), parser.getNumber());
|
||||
Intent intent = PullRequestPagerActivity.createIntent(getContext(), parser.getRepoId(), parser.getLogin(), parser.getNumber());
|
||||
startActivityForResult(intent, RepoPullRequestMvp.PULL_REQUEST_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@ -28,13 +28,13 @@ import com.fastaccess.helper.Logger;
|
||||
import com.fastaccess.helper.ViewHelper;
|
||||
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
|
||||
import com.fastaccess.ui.base.BaseActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerView;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesView;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsView;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialog;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.merge.MergePullRequestView;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineFragment;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.merge.MergePullRequestDialogFragment;
|
||||
import com.fastaccess.ui.widgets.AvatarLayout;
|
||||
import com.fastaccess.ui.widgets.FontTextView;
|
||||
import com.fastaccess.ui.widgets.ForegroundImageView;
|
||||
@ -53,7 +53,7 @@ import icepick.State;
|
||||
* Created by Kosh on 10 Dec 2016, 9:23 AM
|
||||
*/
|
||||
|
||||
public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View, PullRequestPagerPresenter> implements PullRequestPagerMvp.View {
|
||||
public class PullRequestPagerActivity extends BaseActivity<PullRequestPagerMvp.View, PullRequestPagerPresenter> implements PullRequestPagerMvp.View {
|
||||
|
||||
@BindView(R.id.startGist) ForegroundImageView startGist;
|
||||
@BindView(R.id.forkGist) ForegroundImageView forkGist;
|
||||
@ -74,7 +74,7 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
}
|
||||
|
||||
public static Intent createIntent(@NonNull Context context, @NonNull String repoId, @NonNull String login, int number, boolean showRepoBtn) {
|
||||
Intent intent = new Intent(context, PullRequestPagerView.class);
|
||||
Intent intent = new Intent(context, PullRequestPagerActivity.class);
|
||||
intent.putExtras(Bundler.start()
|
||||
.put(BundleConstant.ID, number)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -92,7 +92,7 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
}
|
||||
|
||||
@OnClick(R.id.fab) void onAddComment() {
|
||||
PullRequestTimelineView view = (PullRequestTimelineView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
PullRequestTimelineFragment view = (PullRequestTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (view != null) {
|
||||
view.onStartNewComment();
|
||||
}
|
||||
@ -174,11 +174,11 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
getPresenter().onLoadLabels();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.edit) {
|
||||
CreateIssueView.startForResult(this, getPresenter().getLogin(), getPresenter().getRepoId(), getPresenter().getPullRequest());
|
||||
CreateIssueActivity.startForResult(this, getPresenter().getLogin(), getPresenter().getRepoId(), getPresenter().getPullRequest());
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.milestone) {
|
||||
MilestoneDialog.newInstance(getPresenter().getLogin(), getPresenter().getRepoId())
|
||||
.show(getSupportFragmentManager(), "MilestoneDialog");
|
||||
MilestoneDialogFragment.newInstance(getPresenter().getLogin(), getPresenter().getRepoId())
|
||||
.show(getSupportFragmentManager(), "MilestoneDialogFragment");
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.assignees) {
|
||||
getPresenter().onLoadAssignees();
|
||||
@ -186,7 +186,7 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
} else if (item.getItemId() == R.id.merge) {
|
||||
if (getPresenter().getPullRequest() != null) {
|
||||
String msg = getPresenter().getPullRequest().getTitle();
|
||||
MergePullRequestView.newInstance(msg).show(getSupportFragmentManager(), "MergePullRequestView");
|
||||
MergePullRequestDialogFragment.newInstance(msg).show(getSupportFragmentManager(), "MergePullRequestDialogFragment");
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
@ -294,9 +294,9 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
|
||||
@Override public void onLabelsRetrieved(@NonNull List<LabelModel> items) {
|
||||
hideProgress();
|
||||
LabelsView.newInstance(items, getPresenter().getPullRequest() != null ? getPresenter().getPullRequest().getLabels() : null,
|
||||
LabelsDialogFragment.newInstance(items, getPresenter().getPullRequest() != null ? getPresenter().getPullRequest().getLabels() : null,
|
||||
getPresenter().getRepoId(), getPresenter().getLogin())
|
||||
.show(getSupportFragmentManager(), "LabelsView");
|
||||
.show(getSupportFragmentManager(), "LabelsDialogFragment");
|
||||
}
|
||||
|
||||
@Override public void onUpdateMenu() {
|
||||
@ -336,7 +336,7 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
|
||||
@Override public void onUpdateTimeline() {
|
||||
showMessage(R.string.success, R.string.labels_added_successfully);
|
||||
PullRequestTimelineView pullRequestDetailsView = (PullRequestTimelineView) pager.getAdapter().instantiateItem(pager, 0);
|
||||
PullRequestTimelineFragment pullRequestDetailsView = (PullRequestTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
if (pullRequestDetailsView != null) {
|
||||
pullRequestDetailsView.onRefresh();
|
||||
}
|
||||
@ -344,8 +344,8 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
|
||||
@Override public void onShowAssignees(@NonNull List<User> items) {
|
||||
hideProgress();
|
||||
AssigneesView.newInstance(items)
|
||||
.show(getSupportFragmentManager(), "AssigneesView");
|
||||
AssigneesDialogFragment.newInstance(items)
|
||||
.show(getSupportFragmentManager(), "AssigneesDialogFragment");
|
||||
}
|
||||
|
||||
@Override public void onMileStoneSelected(@NonNull MilestoneModel milestoneModel) {
|
||||
@ -360,7 +360,7 @@ public class PullRequestPagerView extends BaseActivity<PullRequestPagerMvp.View,
|
||||
NameParser nameParser = new NameParser("");
|
||||
nameParser.setName(getPresenter().getRepoId());
|
||||
nameParser.setUsername(getPresenter().getLogin());
|
||||
RepoPagerView.startRepoPager(this, nameParser);
|
||||
RepoPagerActivity.startRepoPager(this, nameParser);
|
||||
finish();
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class PullRequestCommitsView extends BaseFragment<PullRequestCommitsMvp.View, PullRequestCommitsPresenter>
|
||||
public class PullRequestCommitsFragment extends BaseFragment<PullRequestCommitsMvp.View, PullRequestCommitsPresenter>
|
||||
implements PullRequestCommitsMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -31,8 +31,8 @@ public class PullRequestCommitsView extends BaseFragment<PullRequestCommitsMvp.V
|
||||
private OnLoadMore onLoadMore;
|
||||
private CommitsAdapter adapter;
|
||||
|
||||
public static PullRequestCommitsView newInstance(@NonNull String repoId, @NonNull String login, long number) {
|
||||
PullRequestCommitsView view = new PullRequestCommitsView();
|
||||
public static PullRequestCommitsFragment newInstance(@NonNull String repoId, @NonNull String login, long number) {
|
||||
PullRequestCommitsFragment view = new PullRequestCommitsFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -52,7 +52,7 @@ public class PullRequestCommitsView extends BaseFragment<PullRequestCommitsMvp.V
|
||||
|
||||
@Override protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
if (getArguments() == null) {
|
||||
throw new NullPointerException("Bundle is null, therefore, PullRequestCommitsView can't be proceeded.");
|
||||
throw new NullPointerException("Bundle is null, therefore, PullRequestCommitsFragment can't be proceeded.");
|
||||
}
|
||||
stateLayout.setEmptyText(R.string.no_commits);
|
||||
stateLayout.setOnReloadListener(this);
|
||||
@ -12,7 +12,7 @@ import com.fastaccess.helper.RxHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -100,7 +100,7 @@ class PullRequestCommitsPresenter extends BasePresenter<PullRequestCommitsMvp.Vi
|
||||
}
|
||||
|
||||
@Override public void onItemClick(int position, View v, Commit item) {
|
||||
CommitPagerView.createIntentForOffline(v.getContext(), item);
|
||||
CommitPagerActivity.createIntentForOffline(v.getContext(), item);
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, Commit item) {
|
||||
|
||||
@ -25,7 +25,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class PullRequestFilesView extends BaseFragment<PullRequestFilesMvp.View, PullRequestFilesPresenter>
|
||||
public class PullRequestFilesFragment extends BaseFragment<PullRequestFilesMvp.View, PullRequestFilesPresenter>
|
||||
implements PullRequestFilesMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -35,8 +35,8 @@ public class PullRequestFilesView extends BaseFragment<PullRequestFilesMvp.View,
|
||||
@State SparseBooleanArrayParcelable sparseBooleanArray;
|
||||
private CommitFilesAdapter adapter;
|
||||
|
||||
public static PullRequestFilesView newInstance(@NonNull String repoId, @NonNull String login, long number) {
|
||||
PullRequestFilesView view = new PullRequestFilesView();
|
||||
public static PullRequestFilesFragment newInstance(@NonNull String repoId, @NonNull String login, long number) {
|
||||
PullRequestFilesFragment view = new PullRequestFilesFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.ID, repoId)
|
||||
.put(BundleConstant.EXTRA, login)
|
||||
@ -56,7 +56,7 @@ public class PullRequestFilesView extends BaseFragment<PullRequestFilesMvp.View,
|
||||
|
||||
@Override protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
if (getArguments() == null) {
|
||||
throw new NullPointerException("Bundle is null, therefore, PullRequestFilesView can't be proceeded.");
|
||||
throw new NullPointerException("Bundle is null, therefore, PullRequestFilesFragment can't be proceeded.");
|
||||
}
|
||||
stateLayout.setEmptyText(R.string.no_commits);
|
||||
stateLayout.setOnReloadListener(this);
|
||||
@ -12,7 +12,7 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerView;
|
||||
import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -94,7 +94,7 @@ class PullRequestFilesPresenter extends BasePresenter<PullRequestFilesMvp.View>
|
||||
}
|
||||
|
||||
@Override public void onItemLongClick(int position, View v, CommitFileModel item) {
|
||||
v.getContext().startActivity(CommitPagerView.createIntent(v.getContext(), repoId, login, Uri.parse(item.getContentsUrl())
|
||||
v.getContext().startActivity(CommitPagerActivity.createIntent(v.getContext(), repoId, login, Uri.parse(item.getContentsUrl())
|
||||
.getQueryParameter("ref")));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@ import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.IssuePullsTimelineAdapter;
|
||||
import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.editor.EditorView;
|
||||
import com.fastaccess.ui.modules.repos.reactions.ReactionsDialogView;
|
||||
import com.fastaccess.ui.modules.editor.EditorActivity;
|
||||
import com.fastaccess.ui.modules.repos.reactions.ReactionsDialogFragment;
|
||||
import com.fastaccess.ui.widgets.AppbarRefreshLayout;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.dialog.MessageDialogView;
|
||||
@ -36,7 +36,7 @@ import icepick.State;
|
||||
* Created by Kosh on 31 Mar 2017, 7:35 PM
|
||||
*/
|
||||
|
||||
public class PullRequestTimelineView extends BaseFragment<PullRequestTimelineMvp.View, PullRequestTimelinePresenter> implements
|
||||
public class PullRequestTimelineFragment extends BaseFragment<PullRequestTimelineMvp.View, PullRequestTimelinePresenter> implements
|
||||
PullRequestTimelineMvp.View {
|
||||
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -46,8 +46,8 @@ public class PullRequestTimelineView extends BaseFragment<PullRequestTimelineMvp
|
||||
private OnLoadMore onLoadMore;
|
||||
@State SparseBooleanArrayParcelable sparseBooleanArray;
|
||||
|
||||
public static PullRequestTimelineView newInstance(@NonNull PullRequest issueModel) {
|
||||
PullRequestTimelineView view = new PullRequestTimelineView();
|
||||
public static PullRequestTimelineFragment newInstance(@NonNull PullRequest issueModel) {
|
||||
PullRequestTimelineFragment view = new PullRequestTimelineFragment();
|
||||
view.setArguments(Bundler.start().put(BundleConstant.ITEM, issueModel).end());//TODO fix this
|
||||
return view;
|
||||
}
|
||||
@ -129,7 +129,7 @@ public class PullRequestTimelineView extends BaseFragment<PullRequestTimelineMvp
|
||||
}
|
||||
|
||||
@Override public void onEditComment(@NonNull Comment item) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -157,7 +157,7 @@ public class PullRequestTimelineView extends BaseFragment<PullRequestTimelineMvp
|
||||
}
|
||||
|
||||
@Override public void onTagUser(@Nullable User user) {
|
||||
Intent intent = new Intent(getContext(), EditorView.class);
|
||||
Intent intent = new Intent(getContext(), EditorActivity.class);
|
||||
intent.putExtras(Bundler
|
||||
.start()
|
||||
.put(BundleConstant.ID, getPresenter().repoId())
|
||||
@ -214,7 +214,7 @@ public class PullRequestTimelineView extends BaseFragment<PullRequestTimelineMvp
|
||||
|
||||
@Override public void showReactionsPopup(@NonNull ReactionTypes type, @NonNull String login,
|
||||
@NonNull String repoId, long id) {
|
||||
ReactionsDialogView.newInstance(login, repoId, type, id).show(getChildFragmentManager(), "ReactionsDialogView");
|
||||
ReactionsDialogFragment.newInstance(login, repoId, type, id).show(getChildFragmentManager(), "ReactionsDialogFragment");
|
||||
}
|
||||
|
||||
private void showReload() {
|
||||
@ -20,15 +20,15 @@ import butterknife.OnClick;
|
||||
* Created by Kosh on 18 Mar 2017, 12:13 PM
|
||||
*/
|
||||
|
||||
public class MergePullRequestView extends BaseDialogFragment<MergePullReqeustMvp.View, MergePullRequestPresenter>
|
||||
public class MergePullRequestDialogFragment extends BaseDialogFragment<MergePullReqeustMvp.View, MergePullRequestPresenter>
|
||||
implements MergePullReqeustMvp.View {
|
||||
|
||||
@BindView(R.id.title) TextInputLayout title;
|
||||
|
||||
private MergePullReqeustMvp.MergeCallback mergeCallback;
|
||||
|
||||
public static MergePullRequestView newInstance(@Nullable String title) {
|
||||
MergePullRequestView view = new MergePullRequestView();
|
||||
public static MergePullRequestDialogFragment newInstance(@Nullable String title) {
|
||||
MergePullRequestDialogFragment view = new MergePullRequestDialogFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA, title)
|
||||
.end());
|
||||
@ -27,7 +27,7 @@ import butterknife.BindView;
|
||||
* Created by Kosh on 11 Apr 2017, 11:30 AM
|
||||
*/
|
||||
|
||||
public class ReactionsDialogView extends BaseDialogFragment<ReactionsDialogMvp.View, ReactionsDialogPresenter>
|
||||
public class ReactionsDialogFragment extends BaseDialogFragment<ReactionsDialogMvp.View, ReactionsDialogPresenter>
|
||||
implements ReactionsDialogMvp.View {
|
||||
|
||||
@BindView(R.id.toolbar) Toolbar toolbar;
|
||||
@ -38,8 +38,8 @@ public class ReactionsDialogView extends BaseDialogFragment<ReactionsDialogMvp.V
|
||||
private UsersAdapter adapter;
|
||||
private OnLoadMore onLoadMore;
|
||||
|
||||
public static ReactionsDialogView newInstance(@NonNull String login, @NonNull String repoId, @NonNull ReactionTypes type, long id) {
|
||||
ReactionsDialogView view = new ReactionsDialogView();
|
||||
public static ReactionsDialogFragment newInstance(@NonNull String login, @NonNull String repoId, @NonNull ReactionTypes type, long id) {
|
||||
ReactionsDialogFragment view = new ReactionsDialogFragment();
|
||||
view.setArguments(Bundler.start()
|
||||
.put(BundleConstant.EXTRA_TYPE, type)
|
||||
.put(BundleConstant.EXTRA, repoId)
|
||||
@ -31,7 +31,7 @@ import butterknife.OnTextChanged;
|
||||
* Created by Kosh on 08 Dec 2016, 8:22 PM
|
||||
*/
|
||||
|
||||
public class SearchView extends BaseActivity<SearchMvp.View, SearchPresenter> implements SearchMvp.View {
|
||||
public class SearchActivity extends BaseActivity<SearchMvp.View, SearchPresenter> implements SearchMvp.View {
|
||||
|
||||
@BindView(R.id.searchEditText) FontAutoCompleteEditText searchEditText;
|
||||
@BindView(R.id.clear) ForegroundImageView clear;
|
||||
@ -10,10 +10,10 @@ import com.fastaccess.data.dao.model.SearchHistory;
|
||||
import com.fastaccess.helper.AppHelper;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.search.code.SearchCodeView;
|
||||
import com.fastaccess.ui.modules.search.issues.SearchIssuesView;
|
||||
import com.fastaccess.ui.modules.search.repos.SearchReposView;
|
||||
import com.fastaccess.ui.modules.search.users.SearchUsersView;
|
||||
import com.fastaccess.ui.modules.search.code.SearchCodeFragment;
|
||||
import com.fastaccess.ui.modules.search.issues.SearchIssuesFragment;
|
||||
import com.fastaccess.ui.modules.search.repos.SearchReposFragment;
|
||||
import com.fastaccess.ui.modules.search.users.SearchUsersFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -47,10 +47,10 @@ class SearchPresenter extends BasePresenter<SearchMvp.View> implements SearchMvp
|
||||
editText.dismissDropDown();
|
||||
AppHelper.hideKeyboard(editText);
|
||||
String query = InputHelper.toString(editText);
|
||||
SearchReposView repos = (SearchReposView) viewPager.getAdapter().instantiateItem(viewPager, 0);
|
||||
SearchUsersView users = (SearchUsersView) viewPager.getAdapter().instantiateItem(viewPager, 1);
|
||||
SearchIssuesView issues = (SearchIssuesView) viewPager.getAdapter().instantiateItem(viewPager, 2);
|
||||
SearchCodeView code = (SearchCodeView) viewPager.getAdapter().instantiateItem(viewPager, 3);
|
||||
SearchReposFragment repos = (SearchReposFragment) viewPager.getAdapter().instantiateItem(viewPager, 0);
|
||||
SearchUsersFragment users = (SearchUsersFragment) viewPager.getAdapter().instantiateItem(viewPager, 1);
|
||||
SearchIssuesFragment issues = (SearchIssuesFragment) viewPager.getAdapter().instantiateItem(viewPager, 2);
|
||||
SearchCodeFragment code = (SearchCodeFragment) viewPager.getAdapter().instantiateItem(viewPager, 3);
|
||||
repos.onSetSearchQuery(query);
|
||||
users.onSetSearchQuery(query);
|
||||
issues.onSetSearchQuery(query);
|
||||
|
||||
@ -13,7 +13,7 @@ import com.fastaccess.helper.InputHelper;
|
||||
import com.fastaccess.provider.rest.loadmore.OnLoadMore;
|
||||
import com.fastaccess.ui.adapter.SearchCodeAdapter;
|
||||
import com.fastaccess.ui.base.BaseFragment;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerView;
|
||||
import com.fastaccess.ui.modules.code.CodeViewerActivity;
|
||||
import com.fastaccess.ui.widgets.StateLayout;
|
||||
import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView;
|
||||
|
||||
@ -24,7 +24,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class SearchCodeView extends BaseFragment<SearchCodeMvp.View, SearchCodePresenter> implements SearchCodeMvp.View {
|
||||
public class SearchCodeFragment extends BaseFragment<SearchCodeMvp.View, SearchCodePresenter> implements SearchCodeMvp.View {
|
||||
|
||||
@State String searchQuery;
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -33,8 +33,8 @@ public class SearchCodeView extends BaseFragment<SearchCodeMvp.View, SearchCodeP
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private SearchCodeAdapter adapter;
|
||||
|
||||
public static SearchCodeView newInstance() {
|
||||
return new SearchCodeView();
|
||||
public static SearchCodeFragment newInstance() {
|
||||
return new SearchCodeFragment();
|
||||
}
|
||||
|
||||
@Override public void onNotifyAdapter() {
|
||||
@ -116,7 +116,7 @@ public class SearchCodeView extends BaseFragment<SearchCodeMvp.View, SearchCodeP
|
||||
|
||||
@Override public void onItemClicked(@NonNull SearchCodeModel item) {
|
||||
if (item.getUrl() != null) {
|
||||
CodeViewerView.startActivity(getContext(), item.getUrl());
|
||||
CodeViewerActivity.startActivity(getContext(), item.getUrl());
|
||||
} else {
|
||||
showErrorMessage(getString(R.string.no_url));
|
||||
}
|
||||
@ -22,7 +22,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class SearchIssuesView extends BaseFragment<SearchIssuesMvp.View, SearchIssuesPresenter> implements SearchIssuesMvp.View {
|
||||
public class SearchIssuesFragment extends BaseFragment<SearchIssuesMvp.View, SearchIssuesPresenter> implements SearchIssuesMvp.View {
|
||||
|
||||
@State String searchQuery;
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -31,8 +31,8 @@ public class SearchIssuesView extends BaseFragment<SearchIssuesMvp.View, SearchI
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private IssuesAdapter adapter;
|
||||
|
||||
public static SearchIssuesView newInstance() {
|
||||
return new SearchIssuesView();
|
||||
public static SearchIssuesFragment newInstance() {
|
||||
return new SearchIssuesFragment();
|
||||
}
|
||||
|
||||
@Override public void onNotifyAdapter() {
|
||||
@ -8,8 +8,8 @@ import com.fastaccess.data.dao.PullsIssuesParser;
|
||||
import com.fastaccess.data.dao.model.Issue;
|
||||
import com.fastaccess.provider.rest.RestProvider;
|
||||
import com.fastaccess.ui.base.mvp.presenter.BasePresenter;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerView;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerView;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -72,13 +72,13 @@ class SearchIssuesPresenter extends BasePresenter<SearchIssuesMvp.View> implemen
|
||||
if (item.getPullRequest() == null) {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForIssue(item.getHtmlUrl());
|
||||
if (parser != null) {
|
||||
v.getContext().startActivity(IssuePagerView.createIntent(v.getContext(), parser.getRepoId(),
|
||||
v.getContext().startActivity(IssuePagerActivity.createIntent(v.getContext(), parser.getRepoId(),
|
||||
parser.getLogin(), parser.getNumber(), true));
|
||||
}
|
||||
} else {
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForPullRequest(item.getHtmlUrl());
|
||||
if (parser != null) {
|
||||
v.getContext().startActivity(PullRequestPagerView.createIntent(v.getContext(), parser.getRepoId(),
|
||||
v.getContext().startActivity(PullRequestPagerActivity.createIntent(v.getContext(), parser.getRepoId(),
|
||||
parser.getLogin(), parser.getNumber(), true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ import icepick.State;
|
||||
* Created by Kosh on 03 Dec 2016, 3:56 PM
|
||||
*/
|
||||
|
||||
public class SearchReposView extends BaseFragment<SearchReposMvp.View, SearchReposPresenter> implements SearchReposMvp.View {
|
||||
public class SearchReposFragment extends BaseFragment<SearchReposMvp.View, SearchReposPresenter> implements SearchReposMvp.View {
|
||||
|
||||
@State String searchQuery;
|
||||
@BindView(R.id.recycler) DynamicRecyclerView recycler;
|
||||
@ -31,8 +31,8 @@ public class SearchReposView extends BaseFragment<SearchReposMvp.View, SearchRep
|
||||
private OnLoadMore<String> onLoadMore;
|
||||
private ReposAdapter adapter;
|
||||
|
||||
public static SearchReposView newInstance() {
|
||||
return new SearchReposView();
|
||||
public static SearchReposFragment newInstance() {
|
||||
return new SearchReposFragment();
|
||||
}
|
||||
|
||||
@Override public void onNotifyAdapter() {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user