Skip to content
This repository was archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
this commit fixes #1168 and some other bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
k0shk0sh committed Oct 22, 2017
1 parent 0a1b828 commit 64a7b52
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class MarkDownProvider {
};

private static final String[] ARCHIVE_EXTENSIONS = {
".zip", ".7z", ".rar", ".tar.gz", ".tgz", ".tar.Z", ".tar.bz2", ".tbz2", ".tar.lzma", ".tlz", ".apk", ".jar", ".dmg", ".pdf"
".zip", ".7z", ".rar", ".tar.gz", ".tgz", ".tar.Z", ".tar.bz2", ".tbz2", ".tar.lzma", ".tlz", ".apk", ".jar", ".dmg", ".pdf", ".ico"
};

private MarkDownProvider() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import com.fastaccess.ui.base.BaseActivity;
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.extras.license.RepoLicenseBottomSheet;
import com.fastaccess.ui.modules.repos.extras.misc.RepoMiscDialogFragment;
import com.fastaccess.ui.modules.repos.extras.misc.RepoMiscMVp;
Expand Down Expand Up @@ -569,22 +568,21 @@ public static Intent createIntent(@NonNull Context context, @NonNull String repo
}

@Override public void onBackPressed() {
if (navType == RepoPagerMvp.CODE) {
RepoCodePagerFragment codePagerView = (RepoCodePagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(),
RepoCodePagerFragment.TAG);
if (codePagerView != null) {
if (codePagerView.canPressBack()) {
super.onBackPressed();
} else {
codePagerView.onBackPressed();
return;
}
}
} else if (navType == RepoPagerMvp.ISSUES) {
if (filterLayout.isShown()) {
hideFilterLayout();
return;
}
// if (navType == RepoPagerMvp.CODE) {
// RepoCodePagerFragment codePagerView = (RepoCodePagerFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(),
// RepoCodePagerFragment.TAG);
// if (codePagerView != null) {
// if (codePagerView.canPressBack()) {
// super.onBackPressed();
// } else {
// codePagerView.onBackPressed();
// return;
// }
// }
// } else
if (navType == RepoPagerMvp.ISSUES && filterLayout.isShown()) {
hideFilterLayout();
return;
}
super.onBackPressed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
import com.fastaccess.helper.InputHelper;
import com.fastaccess.helper.Logger;
import com.fastaccess.helper.ParseDateFormat;
import com.fastaccess.helper.PrefGetter;
import com.fastaccess.helper.ViewHelper;
import com.fastaccess.provider.scheme.LinkParserHelper;
import com.fastaccess.ui.adapter.FragmentsPagerAdapter;
import com.fastaccess.ui.base.BaseActivity;
import com.fastaccess.ui.modules.editor.comment.CommentEditorFragment;
import com.fastaccess.ui.modules.main.premium.PremiumActivity;
import com.fastaccess.ui.modules.repos.RepoPagerActivity;
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesDialogFragment;
Expand Down Expand Up @@ -224,7 +226,11 @@ public static Intent createIntent(@NonNull Context context, @NonNull String repo
ActivityHelper.startCustomTab(this, issueModel.getHtmlUrl());
return true;
} else if (item.getItemId() == R.id.pinUnpin) {
getPresenter().onPinUnpinIssue();
if (PrefGetter.isProEnabled()) {
getPresenter().onPinUnpinIssue();
} else {
PremiumActivity.Companion.startActivity(this);
}
return true;
}
return super.onOptionsItemSelected(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ public static Intent createIntent(@NonNull Context context, @NonNull String repo
getPresenter().onSubscribeOrMute(true);
return true;
} else if (item.getItemId() == R.id.pinUnpin) {
getPresenter().onPinUnpinPullRequest();
if (PrefGetter.isProEnabled()) {
getPresenter().onPinUnpinPullRequest();
} else {
PremiumActivity.Companion.startActivity(this);
}
return true;
}
return super.onOptionsItemSelected(item);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:orientation="vertical">

<include layout="@layout/appbar_tabbed_elevation"/>

Expand All @@ -12,4 +13,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/scroll_behavior"/>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
• Login to unlimited accounts\n
• Edit & Add unlimited Gist Files\n
• Project Columns & Cards (Edit, Create & Delete)
• Pin Issues & PRs
• New upcoming PRO features (Coming soon...)
]]></string>
<string name="enterprise_pro_description" translatable="false"><![CDATA[
Expand Down

0 comments on commit 64a7b52

Please sign in to comment.