Update Help & feedback screen

pull/1396/head
Alex Baker 3 years ago
parent f79fdaabb6
commit bfe4342bd7

@ -57,7 +57,7 @@ class WhatsNewDialog : DialogFragment() {
changelog.movementMethod = LinkMovementMethod.getInstance()
changelog.text = markwon.toMarkdown(text)
val begForSubscription = firebase.noChurn() && !inventory.hasPro
val begForSubscription = !inventory.hasPro
val begForRating = !preferences.getBoolean(R.string.p_clicked_rate, false)
&& (inventory.purchasedThemes() || firebase.noChurn())
&& (!begForSubscription || Random.nextBoolean())

@ -7,14 +7,19 @@ import androidx.fragment.app.FragmentManager
import dagger.hilt.android.AndroidEntryPoint
import org.tasks.BuildConfig
import org.tasks.R
import org.tasks.Tasks.Companion.IS_GENERIC
import org.tasks.analytics.Firebase
import org.tasks.dialogs.WhatsNewDialog
import org.tasks.injection.InjectingPreferenceFragment
import javax.inject.Inject
private const val FRAG_TAG_WHATS_NEW = "frag_tag_whats_new"
@AndroidEntryPoint
class HelpAndFeedback : InjectingPreferenceFragment() {
@Inject lateinit var firebase: Firebase
override fun getPreferenceXml() = R.xml.help_and_feedback
override suspend fun setupPreferences(savedInstanceState: Bundle?) {
@ -48,12 +53,13 @@ class HelpAndFeedback : InjectingPreferenceFragment() {
true
}
@Suppress("ConstantConditionIf")
if (BuildConfig.FLAVOR == "generic") {
if (IS_GENERIC) {
remove(
R.string.p_collect_statistics,
R.string.rate_tasks,
)
} else if (!firebase.noChurn()) {
remove(R.string.rate_tasks)
}
}

@ -205,6 +205,8 @@ object CustomIcons {
1180 to R.drawable.ic_plumbing_24px,
1181 to R.drawable.ic_pest_control_rodent_24px,
1182 to R.drawable.ic_outline_people_outline_24,
1183 to R.drawable.ic_outline_forum_24,
1184 to R.drawable.ic_twitter_logo_black,
)
@JvmStatic

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="?attr/colorControlNormal" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M15,4v7L5.17,11L4,12.17L4,4h11m1,-2L3,2c-0.55,0 -1,0.45 -1,1v14l4,-4h10c0.55,0 1,-0.45 1,-1L17,3c0,-0.55 -0.45,-1 -1,-1zM21,6h-2v9L6,15v2c0,0.55 0.45,1 1,1h11l4,4L22,7c0,-0.55 -0.45,-1 -1,-1z"/>
</vector>

@ -0,0 +1,4 @@
<vector android:height="20dp" android:viewportHeight="204"
android:viewportWidth="248" android:width="24.313726dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M221.95,51.29c0.15,2.17 0.15,4.34 0.15,6.53c0,66.73 -50.8,143.69 -143.69,143.69v-0.04C50.97,201.51 24.1,193.65 1,178.83c3.99,0.48 8,0.72 12.02,0.73c22.74,0.02 44.83,-7.61 62.72,-21.66c-21.61,-0.41 -40.56,-14.5 -47.18,-35.07c7.57,1.46 15.37,1.16 22.8,-0.87C27.8,117.2 10.85,96.5 10.85,72.46c0,-0.22 0,-0.43 0,-0.64c7.02,3.91 14.88,6.08 22.92,6.32C11.58,63.31 4.74,33.79 18.14,10.71c25.64,31.55 63.47,50.73 104.08,52.76c-4.07,-17.54 1.49,-35.92 14.61,-48.25c20.34,-19.12 52.33,-18.14 71.45,2.19c11.31,-2.23 22.15,-6.38 32.07,-12.26c-3.77,11.69 -11.66,21.62 -22.2,27.93c10.01,-1.18 19.79,-3.86 29,-7.95C240.37,35.29 231.83,44.14 221.95,51.29z"/>
</vector>

@ -28,6 +28,8 @@
<string name="url_tasker">https://tasks.org/help/tasker</string>
<string name="url_donate">https://tasks.org/donate</string>
<string name="url_reddit">https://reddit.com/r/tasks</string>
<string name="url_twitter">https://twitter.com/tasks_org</string>
<string name="url_freenode">https://webchat.freenode.net/?channels=tasks</string>
<string name="url_sponsor">https://github.com/sponsors/abaker</string>
<string name="url_app_passwords">https://tasks.org/passwords</string>

@ -651,7 +651,14 @@ File %1$s contained %2$s.\n\n
<string name="price_per_month">$%s/month</string>
<string name="price_per_month_abbreviated">$%s/mo</string>
<string name="current_subscription">Current subscription: %s</string>
<string name="follow_reddit">Follow r/tasks</string>
<string name="follow_reddit">Join r/tasks</string>
<string name="follow_twitter">Follow @tasks_org</string>
<string name="chat_freenode">Join #tasks on Freenode</string>
<string name="social">Social</string>
<string name="support">Support</string>
<string name="issue_tracker">Issue tracker</string>
<string name="open_source">Open source</string>
<string name="privacy">Privacy</string>
<string name="authorization_cancelled">Authorization cancelled</string>
<string name="not_signed_in">Not signed in</string>
<string name="google_play_subscribers">Google Play subscribers</string>

@ -8,68 +8,111 @@
app:icon="@drawable/ic_outline_new_releases_24px"/>
<Preference
android:title="@string/documentation"
app:icon="@drawable/ic_outline_help_outline_24px">
android:key="@string/rate_tasks"
android:title="@string/rate_tasks"
app:icon="@drawable/ic_outline_star_border_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org" />
android:action="android.intent.action.VIEW"
android:data="@string/market_url" />
</Preference>
<Preference
android:key="@string/follow_reddit"
android:title="@string/follow_reddit"
app:icon="@drawable/ic_reddit_share_silhouette">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/url_reddit" />
</Preference>
<PreferenceCategory
android:title="@string/support">
<Preference
android:key="@string/contact_developer"
android:title="@string/contact_developer"
app:icon="@drawable/ic_outline_email_24px" />
<Preference
android:title="@string/documentation"
app:icon="@drawable/ic_outline_help_outline_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org" />
</Preference>
<Preference
android:key="@string/rate_tasks"
android:title="@string/rate_tasks"
app:icon="@drawable/ic_outline_star_border_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/market_url" />
</Preference>
<Preference
android:title="@string/issue_tracker"
app:icon="@drawable/ic_outline_bug_report_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/tasks/tasks/issues" />
</Preference>
<Preference
android:summary="@string/license_summary"
android:title="@string/source_code"
app:allowDividerAbove="true"
app:icon="@drawable/ic_octocat">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org/source" />
</Preference>
<Preference
android:key="@string/contact_developer"
android:title="@string/contact_developer"
app:icon="@drawable/ic_outline_email_24px" />
<Preference
android:title="@string/third_party_licenses"
app:icon="@drawable/ic_outline_gavel_24px">
<intent
android:targetClass="org.tasks.activities.attribution.AttributionActivity"
android:targetPackage="@string/app_package" />
</Preference>
</PreferenceCategory>
<Preference
android:title="@string/privacy_policy"
app:allowDividerAbove="true"
app:icon="@drawable/ic_outline_perm_identity_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org/privacy.html" />
</Preference>
<PreferenceCategory
android:title="@string/social">
<Preference
android:key="@string/follow_reddit"
android:title="@string/follow_reddit"
app:icon="@drawable/ic_reddit_share_silhouette">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/url_reddit" />
</Preference>
<Preference
android:key="@string/follow_twitter"
android:title="@string/follow_twitter"
app:icon="@drawable/ic_twitter_logo_black">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/url_twitter" />
</Preference>
<Preference
android:key="@string/chat_freenode"
android:title="@string/chat_freenode"
app:icon="@drawable/ic_outline_forum_24">
<intent
android:action="android.intent.action.VIEW"
android:data="@string/url_freenode" />
</Preference>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/open_source">
<Preference
android:summary="@string/license_summary"
android:title="@string/source_code"
app:icon="@drawable/ic_octocat">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org/source" />
</Preference>
<Preference
android:title="@string/third_party_licenses"
app:icon="@drawable/ic_outline_gavel_24px">
<intent
android:targetClass="org.tasks.activities.attribution.AttributionActivity"
android:targetPackage="@string/app_package" />
</Preference>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/privacy">
<Preference
android:title="@string/privacy_policy"
app:icon="@drawable/ic_outline_perm_identity_24px">
<intent
android:action="android.intent.action.VIEW"
android:data="https://tasks.org/privacy.html" />
</Preference>
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="@string/p_collect_statistics"
android:summary="@string/send_anonymous_statistics_summary"
android:title="@string/send_anonymous_statistics"
app:icon="@drawable/ic_outline_bug_report_24px" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="@string/p_collect_statistics"
android:summary="@string/send_anonymous_statistics_summary"
android:title="@string/send_anonymous_statistics"
app:icon="@drawable/ic_outline_bug_report_24px" />
</PreferenceCategory>
</PreferenceScreen>
Loading…
Cancel
Save