diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 556dfb11..0badb7f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ to contribute to mTHMMY in a way that is efficient for everyone. **Important!** Instead of creating publicly viewable issues for suspected security vulnerabilities, please report them in private to -`thmmynolife@gmail.com`. +[thmmynolife@gmail.com](mailto:thmmynolife@gmail.com). ## I want to contribute! @@ -18,7 +18,7 @@ There are many ways of contributing to mTHMMY: - Submitting bugs and ideas to our [issue tracker][github-issues] - Forking mTHMMY and submitting [pull requests](#pull-requests) - Joining our core team -- Contacting us by email at `thmmynolife@gmail.com` +- Contacting us by email at [thmmynolife@gmail.com](mailto:thmmynolife@gmail.com) ## Issue tracker @@ -27,17 +27,17 @@ Before creating a new issue make sure to **search the tracker** for similar ones ## Compiling -Due to the app's integration with Firebase, a `google-services.json` is required inside the `app` directory. To get one, either [set up your own Firebase project][firebase-console] (with or without a self hosted [backend][sisyphus]), or ask us to provide you the one we use for development. +Due to the app's integration with Firebase, a *google-services.json* file is required inside the *app* directory. To get one, either [set up your own Firebase project][firebase-console] (with or without a self hosted [backend][sisyphus]), or ask us to provide you the one we use for development. ## Pull requests Pull requests with fixes and improvements to mTHMMY are most welcome. Any developer that wants to work independently from the core team can simply -follow the workflow below to make a pull request: +follow the workflow below to make a pull request (PR): 1. Fork the project into your personal space on Github -1. Create a feature branch, away from `develop` +1. Create a feature branch, away from [develop](https://github.com/ThmmyNoLife/mTHMMY/tree/develop) 1. Push the commit(s) to your fork -1. Create a pull request (PR) targeting `develop` [at mTHMMY](https://github.com/ThmmyNoLife/mTHMMY/tree/develop) +1. Create a PR targeting [develop at mTHMMY](https://github.com/ThmmyNoLife/mTHMMY/tree/develop) 1. Fill the PR title describing the change you want to make 1. Fill the PR description with a brief motive for your change and the method you used to achieve it 1. Submit the PR. diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java index 59d686a6..4ffc3dff 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java @@ -45,6 +45,8 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF //-----------------------------------------CLASS VARIABLES------------------------------------------ private static final int TIME_INTERVAL = 2000; + private SharedPreferences sharedPrefs; + private static final String DRAWER_INTRO = "DRAWER_INTRO"; private long mBackPressed; private SectionsPagerAdapter sectionsPagerAdapter; private ViewPager viewPager; @@ -83,13 +85,12 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF TabLayout tabLayout = findViewById(R.id.tabs); tabLayout.setupWithViewPager(viewPager); - SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); + sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); int preferredTab = Integer.parseInt(sharedPrefs.getString(DEFAULT_HOME_TAB, "0")); if (preferredTab != 3 || sessionManager.isLoggedIn()) { tabLayout.getTabAt(preferredTab).select(); } - setMainActivity(this); } @@ -103,6 +104,10 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF @Override protected void onResume() { drawer.setSelection(HOME_ID); + if(!sharedPrefs.getBoolean(DRAWER_INTRO, false)){ + drawer.openDrawer(); + sharedPrefs.edit().putBoolean(DRAWER_INTRO, true).apply(); + } updateTabs(); super.onResume(); } diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java index 8ba2bae3..f9a9f8c5 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java @@ -41,11 +41,11 @@ import gr.thmmy.mthmmy.activities.topic.tasks.PrepareForReply; import gr.thmmy.mthmmy.activities.topic.tasks.ReplyTask; import gr.thmmy.mthmmy.activities.topic.tasks.TopicTask; import gr.thmmy.mthmmy.base.BaseActivity; +import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.model.Bookmark; import gr.thmmy.mthmmy.model.Post; import gr.thmmy.mthmmy.model.ThmmyPage; import gr.thmmy.mthmmy.utils.CustomLinearLayoutManager; -import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.utils.HTMLUtils; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import gr.thmmy.mthmmy.viewmodel.TopicViewModel; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 1359e9fa..4c853526 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -42,12 +42,12 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.board.BoardActivity; import gr.thmmy.mthmmy.activities.profile.ProfileActivity; import gr.thmmy.mthmmy.base.BaseActivity; +import gr.thmmy.mthmmy.editorview.EditorView; +import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.model.Post; import gr.thmmy.mthmmy.model.ThmmyFile; import gr.thmmy.mthmmy.model.ThmmyPage; import gr.thmmy.mthmmy.utils.CircleTransform; -import gr.thmmy.mthmmy.editorview.EditorView; -import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import gr.thmmy.mthmmy.viewmodel.TopicViewModel; import timber.log.Timber; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java index 0b527421..63c2955b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/tasks/ReplyTask.java @@ -31,7 +31,7 @@ public class ReplyTask extends AsyncTask { @Override protected Boolean doInBackground(String... args) { final String sentFrommTHMMY = includeAppSignature - ? "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy]mTHMMY [/url][/i][/size][/right]" + ? "\n[right][size=7pt][i]sent from [url=https://play.google.com/store/apps/details?id=gr.thmmy.mthmmy]mTHMMY[/url][/i] [/size][/right]" : ""; RequestBody postBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java index 6caa91d4..dbd760a7 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java @@ -42,7 +42,7 @@ import timber.log.Timber; public class BaseApplication extends Application { private static BaseApplication baseApplication; //BaseApplication singleton - //FirebaseAnalytics + //Firebase Analytics private FirebaseAnalytics firebaseAnalytics; //Client & SessionManager diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/AutoFitGridLayout.java b/app/src/main/java/gr/thmmy/mthmmy/editorview/AutoFitGridLayout.java index 8e3055e5..2b3eff99 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/AutoFitGridLayout.java +++ b/app/src/main/java/gr/thmmy/mthmmy/editorview/AutoFitGridLayout.java @@ -4,6 +4,7 @@ import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.GridLayout; + import gr.thmmy.mthmmy.R; public class AutoFitGridLayout extends GridLayout {