Skip to content

Commit

Permalink
dashboard: no health sync popup (fixes #2692) (#2695)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Nov 10, 2023
1 parent d7968aa commit 74d4cde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1141
versionName "0.11.41"
versionCode 1142
versionName "0.11.42"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class BellDashboardFragment : BaseDashboardFragment() {
)
}
showBadges()

val noOfSurvey = RealmSubmission.getNoOfSurveySubmissionByUser(model.id, mRealm)
if (noOfSurvey >= 1){
val title: String = if (noOfSurvey > 1 ) {
Expand Down Expand Up @@ -86,15 +87,6 @@ class BellDashboardFragment : BaseDashboardFragment() {
}
alertDialog.show()
}

if (!model.id.startsWith("guest") && TextUtils.isEmpty(model.key) && MainApplication.showHealthDialog) {
AlertDialog.Builder(activity!!)
.setMessage(getString(R.string.health_record_not_available_sync_health_data))
.setPositiveButton(getString(R.string.sync)) { _: DialogInterface?, _: Int ->
syncKeyId()
MainApplication.showHealthDialog = false
}.setNegativeButton(getString(R.string.cancel), null).show()
}
}

private fun showBadges() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class MyHealthFragment : Fragment() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

alertMyPersonalBinding = AlertMyPersonalBinding.inflate(LayoutInflater.from(context))

fragmentVitalSignBinding.rvRecords.addItemDecoration(
Expand All @@ -83,7 +82,6 @@ class MyHealthFragment : Fragment() {
fragmentVitalSignBinding.fabAddMember.setOnClickListener {
startActivity(Intent(activity, BecomeMemberActivity::class.java))
}

}

private fun getHealthRecords(memberId: String?) {
Expand Down Expand Up @@ -272,4 +270,4 @@ class MyHealthFragment : Fragment() {
}
}
}
}
}

0 comments on commit 74d4cde

Please sign in to comment.