mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 02:39:55 +01:00
Make debuglog submission slightly more discoverable.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.components.settings.app.help
|
||||
|
||||
import android.view.MenuItem
|
||||
import androidx.navigation.Navigation
|
||||
import org.thoughtcrime.securesms.BuildConfig
|
||||
import org.thoughtcrime.securesms.R
|
||||
@@ -10,16 +9,7 @@ import org.thoughtcrime.securesms.components.settings.DSLSettingsFragment
|
||||
import org.thoughtcrime.securesms.components.settings.DSLSettingsText
|
||||
import org.thoughtcrime.securesms.components.settings.configure
|
||||
|
||||
class HelpSettingsFragment : DSLSettingsFragment(R.string.preferences__help, R.menu.help_settings) {
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return if (item.itemId == R.id.action_submit_debug_log) {
|
||||
Navigation.findNavController(requireView()).navigate(R.id.action_helpSettingsFragment_to_submitDebugLogActivity)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
class HelpSettingsFragment : DSLSettingsFragment(R.string.preferences__help) {
|
||||
|
||||
override fun bindAdapter(adapter: DSLSettingsAdapter) {
|
||||
adapter.submitList(getConfiguration().toMappingModelList())
|
||||
@@ -46,6 +36,13 @@ class HelpSettingsFragment : DSLSettingsFragment(R.string.preferences__help, R.m
|
||||
summary = DSLSettingsText.from(BuildConfig.VERSION_NAME)
|
||||
)
|
||||
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.HelpSettingsFragment__debug_log),
|
||||
onClick = {
|
||||
Navigation.findNavController(requireView()).navigate(R.id.action_helpSettingsFragment_to_submitDebugLogActivity)
|
||||
}
|
||||
)
|
||||
|
||||
externalLinkPref(
|
||||
title = DSLSettingsText.from(R.string.HelpSettingsFragment__terms_amp_privacy_policy),
|
||||
linkId = R.string.terms_and_privacy_policy_url
|
||||
|
||||
@@ -58,7 +58,7 @@ public class SubmitDebugLogActivity extends BaseActivity implements SubmitDebugL
|
||||
dynamicTheme.onCreate(this);
|
||||
setContentView(R.layout.submit_debug_log_activity);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setTitle(R.string.AndroidManifest__log_submit);
|
||||
getSupportActionBar().setTitle(R.string.HelpSettingsFragment__debug_log);
|
||||
|
||||
initView();
|
||||
initViewModel();
|
||||
|
||||
Reference in New Issue
Block a user