mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
replaced splash screen with FastHub identity fixing the scaling issue on larger screens, added last updated label to make sense of the update date showing, fixed Issue labeling where only the repo owner could label an issue. fixing some of what reported in #19, made NavigationView consume clicks to prevent touching behind it closing #18
This commit is contained in:
parent
48644d4c7f
commit
badae3d8b1
@ -31,6 +31,7 @@ public class ReposViewHolder extends BaseViewHolder<RepoModel> {
|
||||
@BindView(R.id.forks) FontTextView forks;
|
||||
@BindView(R.id.avatarLayout) AvatarLayout avatarLayout;
|
||||
@BindString(R.string.forked) String forked;
|
||||
@BindString(R.string.last_updated) String lastUpdated;
|
||||
|
||||
private ReposViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter) {
|
||||
super(itemView, adapter);
|
||||
@ -55,7 +56,9 @@ public class ReposViewHolder extends BaseViewHolder<RepoModel> {
|
||||
NumberFormat numberFormat = NumberFormat.getNumberInstance();
|
||||
stars.setText(numberFormat.format(repo.getStargazersCount()));
|
||||
forks.setText(numberFormat.format(repo.getForks()));
|
||||
date.setText(ParseDateFormat.getTimeAgo(repo.getUpdatedAt()));
|
||||
date.setText(SpannableBuilder.builder().append(lastUpdated)
|
||||
.append(" ")
|
||||
.append(ParseDateFormat.getTimeAgo(repo.getUpdatedAt())));
|
||||
}
|
||||
|
||||
@Override public void bind(@NonNull RepoModel repo) {}
|
||||
|
||||
@ -4,6 +4,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
@ -95,11 +96,8 @@ class IssuePagerPresenter extends BasePresenter<IssuePagerMvp.View> implements I
|
||||
|
||||
@Override public boolean isRepoOwner() {
|
||||
if (getIssue() == null) return false;
|
||||
UserModel userModel = getIssue() != null ? getIssue().getUser() : null;
|
||||
LoginModel me = LoginModel.getUser();
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForPullRequest(getIssue().getHtmlUrl());
|
||||
return userModel != null && userModel.getLogin().equalsIgnoreCase(me.getLogin())
|
||||
|| (parser != null && parser.getLogin().equalsIgnoreCase(me.getLogin()));
|
||||
return TextUtils.equals(login, me.getLogin());
|
||||
}
|
||||
|
||||
@Override public boolean isLocked() {
|
||||
|
||||
@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.annimon.stream.Collectors;
|
||||
import com.annimon.stream.Stream;
|
||||
@ -13,8 +14,6 @@ import com.fastaccess.data.dao.LabelModel;
|
||||
import com.fastaccess.data.dao.LoginModel;
|
||||
import com.fastaccess.data.dao.MergeRequestModel;
|
||||
import com.fastaccess.data.dao.PullRequestModel;
|
||||
import com.fastaccess.data.dao.PullsIssuesParser;
|
||||
import com.fastaccess.data.dao.UserModel;
|
||||
import com.fastaccess.data.service.IssueService;
|
||||
import com.fastaccess.helper.BundleConstant;
|
||||
import com.fastaccess.helper.InputHelper;
|
||||
@ -97,11 +96,8 @@ class PullRequestPagerPresenter extends BasePresenter<PullRequestPagerMvp.View>
|
||||
|
||||
@Override public boolean isRepoOwner() {
|
||||
if (getPullRequest() == null) return false;
|
||||
UserModel userModel = getPullRequest() != null ? getPullRequest().getUser() : null;
|
||||
LoginModel me = LoginModel.getUser();
|
||||
PullsIssuesParser parser = PullsIssuesParser.getForPullRequest(getPullRequest().getHtmlUrl());
|
||||
return userModel != null && userModel.getLogin().equalsIgnoreCase(me.getLogin())
|
||||
|| (parser != null && parser.getLogin().equalsIgnoreCase(me.getLogin()));
|
||||
return TextUtils.equals(login, me.getLogin());
|
||||
}
|
||||
|
||||
@Override public boolean isLocked() {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 129 KiB |
BIN
app/src/main/res/drawable-nodpi/web_hi_res_512.png
Executable file
BIN
app/src/main/res/drawable-nodpi/web_hi_res_512.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@ -1,12 +1,12 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<shape>
|
||||
<solid android:color="@color/accent"/>
|
||||
<solid android:color="@color/primary"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="fill_horizontal"
|
||||
android:src="@drawable/fasthub_splash"/>
|
||||
android:gravity="center"
|
||||
android:src="@drawable/web_hi_res_512"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
@ -47,6 +47,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:clickable="true"
|
||||
android:clipToPadding="false"
|
||||
android:fitsSystemWindows="true"
|
||||
android:paddingBottom="76dp"
|
||||
|
||||
@ -173,4 +173,5 @@
|
||||
<string name="watch_hint">Click here to watch/unwatch repo.</string>
|
||||
<string name="fork_repo_hint">Click here to fork repo.</string>
|
||||
<string name="no_url">No url found.</string>
|
||||
<string name="last_updated">Last Updated</string>
|
||||
</resources>
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="AppTheme">
|
||||
<item name="colorPrimaryDark">@color/transparent</item>
|
||||
<item name="android:windowBackground">@drawable/splash_screen_drawable</item>
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user