diff --git a/app/fastacecss-public b/app/fastaccess-public similarity index 100% rename from app/fastacecss-public rename to app/fastaccess-public diff --git a/app/src/main/java/com/fastaccess/provider/colors/ColorsProvider.java b/app/src/main/java/com/fastaccess/provider/colors/ColorsProvider.java index bfddffcb..37a30713 100644 --- a/app/src/main/java/com/fastaccess/provider/colors/ColorsProvider.java +++ b/app/src/main/java/com/fastaccess/provider/colors/ColorsProvider.java @@ -61,11 +61,14 @@ public class ColorsProvider { } @NonNull public static ArrayList languages() { - return Stream.of(colors) + ArrayList lang = new ArrayList<>(); + lang.add("All Language"); + lang.addAll(Stream.of(colors) .filter(value -> value != null && !InputHelper.isEmpty(value.getKey())) .map(Map.Entry::getKey) .sortBy(s -> !popularLanguages.contains(s)) - .collect(Collectors.toCollection(ArrayList::new)); + .collect(Collectors.toCollection(ArrayList::new))); + return lang; } @Nullable public static LanguageColorModel getColor(@NonNull String lang) { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/FeedsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/FeedsViewHolder.java index 5550959d..65820405 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/FeedsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/FeedsViewHolder.java @@ -11,7 +11,6 @@ import com.fastaccess.R; import com.fastaccess.data.dao.PayloadModel; import com.fastaccess.data.dao.model.Event; import com.fastaccess.data.dao.types.EventsType; -import com.fastaccess.helper.InputHelper; import com.fastaccess.helper.ParseDateFormat; import com.fastaccess.provider.markdown.MarkDownProvider; import com.fastaccess.ui.widgets.AvatarLayout; @@ -82,12 +81,13 @@ public class FeedsViewHolder extends BaseViewHolder { spannableBuilder.bold(action != null ? action.toLowerCase() : "") .append(eventsModel.getPayload() != null && eventsModel.getPayload().getAction() != null ? " " : ""); if (type != EventsType.WatchEvent) { - if (type == EventsType.CreateEvent && !InputHelper.isEmpty(eventsModel.getPayload().getRef())) { + if (type == EventsType.CreateEvent && eventsModel.getPayload() != null && eventsModel.getPayload().getRefType() != null) { spannableBuilder .bold(itemView.getResources().getString(type.getType()).toLowerCase()) .append(" ") .bold(eventsModel.getPayload().getRefType()) .append(" ") + .append(eventsModel.getPayload().getRef() != null ? eventsModel.getPayload().getRef() + " " : "") .append(in) .append(" "); } else if ((type == EventsType.PushEvent || type == EventsType.DeleteEvent) && eventsModel.getPayload() != null) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/prettifier/ViewerFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/prettifier/ViewerFragment.java index 3f2eaeda..5e1c09fd 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/prettifier/ViewerFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/prettifier/ViewerFragment.java @@ -10,6 +10,7 @@ import android.view.MenuItem; import android.view.View; import android.widget.ProgressBar; +import com.evernote.android.state.State; import com.fastaccess.R; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; @@ -22,7 +23,6 @@ import com.fastaccess.ui.widgets.StateLayout; import com.prettifier.pretty.PrettifyWebView; import butterknife.BindView; -import com.evernote.android.state.State; /** * Created by Kosh on 28 Nov 2016, 9:27 PM @@ -143,7 +143,7 @@ public class ViewerFragment extends BaseFragment selectionMap; private AssigneesAdapter adapter; @@ -75,16 +77,13 @@ public class AssigneesDialogFragment extends BaseDialogFragment callApi()); boolean isAssinees = getArguments().getBoolean(BundleConstant.EXTRA_TWO); stateLayout.setEmptyText(isAssinees ? R.string.no_assignees : R.string.no_reviewers); - recycler.setEmptyView(stateLayout); + recycler.setEmptyView(stateLayout, refresh); recycler.addKeyLineDivider(); title.setText(isAssinees ? R.string.assignees : R.string.reviewers); adapter = new AssigneesAdapter(getPresenter().getList(), this); @@ -137,10 +136,12 @@ public class AssigneesDialogFragment extends BaseDialogFragment selectionMap; @@ -87,8 +89,9 @@ public class LabelsDialogFragment extends BaseDialogFragment { + Intent intent = new Intent(this, SettingsCategoryActivity.class); + intent.putExtras(Bundler.start() + .put(BundleConstant.ITEM, position) + .put(BundleConstant.EXTRA, settings[position].getTitle()) + .end()); + switch (position) { + case 1: + ActivityHelper.startReveal(this, intent, settingsList, THEME_CHANGE); + break; + case 4: + showLanguageList(); + break; + default: + ActivityHelper.startReveal(this, intent, settingsList); + break; + } + }); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryActivity.java b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryActivity.java index 62974160..1a4cab5d 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryActivity.java @@ -5,13 +5,15 @@ import android.support.annotation.NonNull; import com.evernote.android.state.State; import com.fastaccess.R; +import com.fastaccess.helper.BundleConstant; import com.fastaccess.ui.base.BaseActivity; import net.grandcentrix.thirtyinch.TiPresenter; -public class SettingsCategoryActivity extends BaseActivity { +public class SettingsCategoryActivity extends BaseActivity implements SettingsCategoryFragment.SettingsCallback { @State String title; + @State int settingsIndex; @Override protected int layout() { return R.layout.activity_settings_category; @@ -33,13 +35,12 @@ public class SettingsCategoryActivity extends BaseActivity { super.onCreate(savedInstanceState); setResult(RESULT_CANCELED); if (savedInstanceState == null) { - title = getIntent() != null ? getIntent().getStringExtra("title") : getString(R.string.settings); - - SettingsCategoryFragment settingsCategoryFragment = SettingsCategoryFragment. - newInstance(getIntent().getIntExtra("settings", 0)); + Bundle bundle = getIntent().getExtras(); + title = bundle.getString(BundleConstant.EXTRA); + settingsIndex = bundle.getInt(BundleConstant.ITEM); getSupportFragmentManager() .beginTransaction() - .replace(R.id.settingsContainer, settingsCategoryFragment) + .replace(R.id.settingsContainer, new SettingsCategoryFragment()) .commit(); } setTitle(title); @@ -48,4 +49,8 @@ public class SettingsCategoryActivity extends BaseActivity { @NonNull @Override public TiPresenter providePresenter() { return new SettingsCategoryPresenter(); } + + @Override public int getSettingsType() { + return settingsIndex; + } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java index c66bf6d9..e291599b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java @@ -11,12 +11,9 @@ import android.support.v4.content.ContextCompat; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceFragmentCompat; import android.util.Log; -import android.widget.FrameLayout; import android.widget.Toast; import com.fastaccess.R; -import com.fastaccess.helper.BundleConstant; -import com.fastaccess.helper.Bundler; import com.fastaccess.helper.InputHelper; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.PrefHelper; @@ -39,14 +36,15 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import butterknife.BindView; import es.dmoral.toasty.Toasty; import static android.app.Activity.RESULT_OK; public class SettingsCategoryFragment extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener { - @BindView(R.id.settingsContainer) FrameLayout settingsContainer; + public interface SettingsCallback { + int getSettingsType(); + } private static int PERMISSION_REQUEST_CODE = 128; private static int RESTORE_REQUEST_CODE = 256; @@ -60,26 +58,30 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement private Preference notificationTime; private Preference notificationRead; private Preference notificationSound; + private SettingsCallback settingsCallback; - @NonNull public static SettingsCategoryFragment newInstance(int settings) { - SettingsCategoryFragment fragment = new SettingsCategoryFragment(); - fragment.setArguments(Bundler.start() - .put(BundleConstant.EXTRA, settings) - .end()); - return fragment; - } @Override public void onAttach(Context context) { super.onAttach(context); this.callback = (BaseMvp.FAView) context; + this.settingsCallback = (SettingsCallback) context; appTheme = PrefHelper.getString("appTheme"); appColor = PrefHelper.getString("appColor"); app_lauguage = PrefHelper.getString("app_language"); } + @Override public void onDetach() { + callback = null; + settingsCallback = null; + super.onDetach(); + } + + @Override public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { - int settings = getArguments().getInt("settings", 0); - switch (settings) { + switch (settingsCallback.getSettingsType()) { case 0: addPreferencesFromResource(R.xml.notification_settings); notificationTime = findPreference("notificationTime"); @@ -158,9 +160,6 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement return true; }); break; - default: - addPreferencesFromResource(R.xml.fasthub_settings); - break; } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/trending/TrendingActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/trending/TrendingActivity.kt index e7e16369..62da2fc1 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/trending/TrendingActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/trending/TrendingActivity.kt @@ -32,7 +32,7 @@ class TrendingActivity : BaseActivity(), Tr val monthly by lazy { findViewById(R.id.monthly) as TextView } val drawerLayout by lazy { findViewById(R.id.drawer) as DrawerLayout } - @State var selectedTitle: String = "" + @State var selectedTitle: String = "All Language" companion object { fun getTrendingIntent(context: Context, lang: String?, query: String?): Intent { @@ -129,12 +129,15 @@ class TrendingActivity : BaseActivity(), Tr } private fun onItemClicked(item: MenuItem?): Boolean { - selectedTitle = item?.title.toString() + when (item?.title.toString()) { + "All Language" -> selectedTitle = "" + else -> selectedTitle = item?.title.toString() + } + Logger.e(selectedTitle) setValues() return true } - private fun closeDrawerLayout() { drawerLayout.closeDrawer(Gravity.END) } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java b/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java index a53b1f0e..026d1ad4 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java @@ -3,7 +3,9 @@ package com.fastaccess.ui.widgets; import android.graphics.drawable.Drawable; import android.support.annotation.ColorInt; import android.text.SpannableStringBuilder; +import android.text.TextPaint; import android.text.style.BackgroundColorSpan; +import android.text.style.ClickableSpan; import android.text.style.ForegroundColorSpan; import android.text.style.ImageSpan; import android.text.style.StyleSpan; @@ -108,5 +110,19 @@ public class SpannableBuilder extends SpannableStringBuilder { return this; } + public SpannableBuilder clickable(final CharSequence text, final View.OnClickListener listener) { + if (!InputHelper.isEmpty(text)) return append(text, new ClickableSpan() { + @Override public void updateDrawState(TextPaint ds) { + ds.setColor(ds.linkColor); + ds.setUnderlineText(false); + } + + @Override public void onClick(View widget) { + listener.onClick(widget); + } + }); + return this; + } + } diff --git a/app/src/main/res/layouts/main_layouts/layout/activity_settings.xml b/app/src/main/res/layouts/main_layouts/layout/activity_settings.xml index c31f1e66..92bf4d94 100644 --- a/app/src/main/res/layouts/main_layouts/layout/activity_settings.xml +++ b/app/src/main/res/layouts/main_layouts/layout/activity_settings.xml @@ -1,7 +1,6 @@ - + android:layout_height="wrap_content"> + + + + diff --git a/app/src/main/res/raw/changelog.html b/app/src/main/res/raw/changelog.html index 752760d2..86c5d9d0 100644 --- a/app/src/main/res/raw/changelog.html +++ b/app/src/main/res/raw/changelog.html @@ -1,76 +1,62 @@ - -

FastHub changelog

-

Version 2.5.0

-
-

P.S: I’m not asking for to much, if you are facing a problem in FastHub please report it at the issue tracker in GitHub either via - FastHub app or from GitHub website, your reviews are what keeps me motivated to further improve FastHub.
- Keep in mind that FastHub is free & open source.

-
-

Bugs , Enhancements & new Features

-
    -
  • (FIX) Oauth login for good!
  • -
  • (FIX) Notifications gets triggered every few seconds
  • -
  • (New) Reply, edit, delete & add PR review comment
  • -
  • (New) Long click on Issue & PR to peak details & add comments faster
  • -
  • (New) Github emoji support in comments & profile bio
  • -
  • (New) Reply, edit, delete & add PR review comment
  • -
  • (New) Reply, edit, delete & add PR review comment
  • -
  • (New) Second click on any top tab will scrollTop.
  • -
  • (New) FastHub Signature
  • -
  • (New) Backup settings option (Pinned Items are coming soon)
  • -
  • (New) Ability to see the Orgs. a person is part of in their profile
  • -
  • (New) Profile contribution Graph
  • -
  • (New) Ability to choose theme accent color
  • -
  • (New) Mentioning ‘@’ in comments.
  • -
  • (New) Repo topics
  • -
  • (New) Reply, now shows the message you’re replying too
  • -
  • (New) Many android “O” items
  • -
  • (New) Language bar on login where default lang is not supported
  • -
  • (New) Created a share option for comments
  • -
  • (New) More notification interval options
  • -
  • (New) Opening repo directories from deep links
  • -
  • (New) Opening releases links
  • -
  • (New) Japanese language
  • -
  • (New) Clicking user details in profile should open image in full
  • -
  • (Enhancement) Redid profile layout
  • -
  • (Enhancement) Redid the layout of the settings
  • -
  • (Enhancement) Truncate PR review files to max 3 lines
  • -
  • (Enhancement) Moved FastHub Repo from DrawerLayout to Pinned Items
  • -
  • (Enhancement) Lowered the white color tone
  • -
  • (Enhancement) More Efficient Markdown
  • -
  • (Enhancement) Merged Gists into one tab
  • -
  • (Enhancement) Issues and Pull Requests now display the repo they’re in
  • -
  • (Enhancement) Reconfigured the Notification Options
  • -
  • (Enhancement) Added the Issue Number to the feed and personal Issues
  • -
  • (Enhancement) Removed the scrollbar for Reactions
  • -
  • (Enhancement) Notifications on a comment now show the profile picture
  • -
  • (Enhancement) You can now dismiss all hints at once
  • -
  • (Enhancement) Removed color accent from DrawerLayout
  • -
  • (Enhancement) Code snippets now show in monospace font
  • -
  • (Enhancement) Comments layout
  • -
  • (Enhancement) Lists & tasks lists in comments.
  • -
  • (Fix) Showing more than 100 comments.
  • -
  • (Fix) Fixed creating new issue link
  • -
  • (Fix) Assignee in issues
  • -
  • (Fix) Ability to react on the first comment
  • -
  • (Fix) Tablet pictures not inline with text
  • -
  • (Fix) Profile icon not updating
  • -
  • (Fix) Changed the color of “Private” label to gray
  • -
  • (Fix) Double progress bar.
  • -
  • (Fix) Fix bolding and italic in the feed
  • -
  • (Fix) Some spelling mistakes
  • -
  • (Fix) Attempt to fix where FastHub would not re-load when muti-tasking
  • -
  • (Fix) Reply editor would not initially focus
  • -
  • (Fix) Hide Mark all as read if there are no unread items
  • -
  • There are more stuff are not mentioned, find them out :p
  • -
  • Lots of bug fixes
  • -
-
-

Thanks to @JediBurrell, @yakov116 & everyone who contributed either via reporting bugs or via code contribution

-
-

Thank you very much

- + + + Untitled Document.md + + + +

FastHub changelog +

+

Version 3.0.0 (Trending Finally!) +

+
+

+ P.S: I’m not asking for to much, if you are facing a problem in FastHub please report it at the issue tracker in GitHub either + via FastHub app or from GitHub website, your reviews are what keeps me motivated to further improve FastHub. +
+ Keep in mind that FastHub is free & open source. +
+

+
+

Bugs , Enhancements & new Features +

+
    +
  • (New) Explore trending with all the languages out there.
  • +
  • (New) Filter Repos (Thanks to @aadithyabk)
  • +
  • (New) See specific user feed.
  • +
  • (New) Display amount of starred repos.
  • +
  • (New) Copy Repo URL to clipboard
  • +
  • (New) Added participated issue sorting to personal issue list
  • +
  • (New) Showing multiple build statues.
  • +
  • (New) Lithuanian language (Thanks to @mistermantas)
  • +
  • (New) no new line at end of file now shows a picture
  • +
  • (Enhancement/Fix) Sort issues by reaction
  • +
  • (Fix) Issues/PRs editing, was semi-broken in preview release
  • +
  • (Fix) Showing missing repo (broken in previous version)
  • +
  • (Fix) Support development now works, + please use it. +
  • +
  • (Fix) Issue count not updating.
  • +
  • (Fix) Emoji’s were joining :crossed_swords:
  • +
  • (Fix) Back button when opening FastHub from an external link
  • +
  • (Fix) Issue comment were only showing up to 100 comments
  • +
  • (Fix) Dropdown menus not closing
  • +
  • (Fix) Some tablets had text wrapping issues
  • +
  • (Fix) Pictures not loading in PR’s/commits
  • +
  • (Fix) Fixed crash when adding a react
  • +
  • (Fix) Some tooltips were incorrect
  • +
  • (Fix) Stargazers are now updated in pinned repo’s
  • +
  • (Fix) Gist links (edited)
  • +
  • There are more stuff are not mentioned, find them out :p
  • +
  • Lots of bug fixes
  • +
+
+

Thanks to everyone who contributed either via reporting bugs or via code contribution

+
+

+ Thank you very much +

- + + \ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 6ff29d37..bab39de9 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -124,7 +124,7 @@ @string/all - + Daily Weekly Monthly