This commit is contained in:
Amine
2017-10-23 18:29:44 +02:00
parent c5ebc89e4f
commit 1da4cc2782
6 changed files with 49 additions and 9 deletions

View File

@ -64,6 +64,7 @@ import com.ashokvarma.bottomnavigation.BottomNavigationBar
import com.ashokvarma.bottomnavigation.BottomNavigationItem
import com.ashokvarma.bottomnavigation.TextBadgeItem
import com.ftinc.scoop.Scoop
import com.heinrichreimersoftware.androidissuereporter.IssueReporterLauncher
import com.mikepenz.materialdrawer.AccountHeader
import com.mikepenz.materialdrawer.AccountHeaderBuilder
import com.mikepenz.materialdrawer.model.ProfileDrawerItem
@ -352,6 +353,25 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
drawer = drawerBuilder.build()
drawer.addStickyFooterItem(
PrimaryDrawerItem()
.withName(R.string.drawer_report_bug)
.withIcon(R.drawable.ic_bug_report)
.withIconTintingEnabled(true)
.withOnDrawerItemClickListener { _, _, _ ->
IssueReporterLauncher.forTarget(getString(R.string.report_github_user), getString(R.string.report_github_repo))
.theme(R.style.Theme_App_Light)
.guestToken(BuildConfig.GITHUB_TOKEN)
.guestEmailRequired(true)
.minDescriptionLength(20)
.putExtraInfo("Unique ID", settings.getString("unique_id", ""))
.putExtraInfo("From github", BuildConfig.GITHUB_VERSION)
.homeAsUpEnabled(true)
.launch(this)
false
}
)
drawer.addStickyFooterItem(
PrimaryDrawerItem()
.withName(R.string.title_activity_settings)

View File

@ -156,4 +156,7 @@
<string name="pref_general_infinite_loading_title">(BETA) Load more articles on scroll</string>
<string name="translation">Translation</string>
<string name="cant_open_invalid_url">The item url is invalid. I\'m looking into solving this issue so the app won\'t crash.</string>
<string name="report_github_user" translatable="false">aminecmi</string>
<string name="report_github_repo" translatable="false">ReaderforSelfoss</string>
<string name="drawer_report_bug">Report a bug</string>
</resources>

View File

@ -191,4 +191,11 @@
<item name="material_drawer_header_selection_text">@color/md_grey_900</item>
</style>
<style name="Theme.App.Light" parent="Theme.IssueReporter.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textColorPrimary">@color/md_grey_900</item>
</style>
</resources>