Skip to content

Commit

Permalink
Add User Data policy (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
TinasheMzondiwa authored Nov 2, 2022
1 parent f183327 commit f132836
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import android.content.DialogInterface
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.text.method.LinkMovementMethod
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import app.ss.runtime.permissions.RuntimePermissions
import com.cryart.sabbathschool.R
import com.cryart.sabbathschool.core.extensions.coroutines.flow.collectIn
import com.cryart.sabbathschool.core.extensions.sdk.isBelowApi
import com.cryart.sabbathschool.core.model.AppConfig
Expand All @@ -48,6 +48,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject
import app.ss.translations.R as L10n

@AndroidEntryPoint
class LoginActivity : AppCompatActivity() {
Expand Down Expand Up @@ -123,15 +124,17 @@ class LoginActivity : AppCompatActivity() {
}
anonymous.setOnClickListener {
MaterialAlertDialogBuilder(this@LoginActivity)
.setTitle(R.string.ss_login_anonymously_dialog_title)
.setMessage(R.string.ss_login_anonymously_dialog_description)
.setPositiveButton(R.string.ss_login_anonymously_dialog_positive) { _: DialogInterface?, _: Int ->
.setTitle(L10n.string.ss_login_anonymously_dialog_title)
.setMessage(L10n.string.ss_login_anonymously_dialog_description)
.setPositiveButton(L10n.string.ss_login_anonymously_dialog_positive) { _: DialogInterface?, _: Int ->
viewModel.handleAnonymousLogin()
}
.setNegativeButton(R.string.ss_login_anonymously_dialog_negative, null)
.setNegativeButton(L10n.string.ss_login_anonymously_dialog_negative, null)
.create()
.show()
}

tvTerms.movementMethod = LinkMovementMethod.getInstance()
}
}

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/layout/ss_login_buttons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@
app:cornerRadius="@dimen/spacing_micro"
app:textAllCaps="false" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvTerms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal"
android:gravity="center"
android:lineSpacingExtra="0sp"
android:paddingHorizontal="@dimen/spacing_large"
android:paddingVertical="@dimen/spacing_normal"
android:text="@string/ss_data_consent"
android:textSize="@dimen/text_size_xsmall"
app:fontFamily="@font/lato_regular" />

</LinearLayout>


Expand Down
5 changes: 5 additions & 0 deletions common/translations/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@

<string name="ss_settings_delete_account_key" translatable="false">ss_settings_logout</string>

<string name="ss_data_consent">
By continuing, you agree to our Terms of Service as described in our <a href="https://adventech.io/privacy-policy">Privacy Policy</a>.\n
Sabbath School collects User IDs to help identify and restore user saved content.
</string>

</resources>

0 comments on commit f132836

Please sign in to comment.