diff --git a/app/src/main/java/net/rec0de/android/watchwitch/activities/MainActivity.kt b/app/src/main/java/net/rec0de/android/watchwitch/activities/MainActivity.kt index aa9c6c3..1efe24c 100644 --- a/app/src/main/java/net/rec0de/android/watchwitch/activities/MainActivity.kt +++ b/app/src/main/java/net/rec0de/android/watchwitch/activities/MainActivity.kt @@ -211,8 +211,10 @@ class MainActivity : AppCompatActivity() { } fun hideWatchSimButton() { - val buttonContainer: LinearLayout = findViewById(R.id.layoutSimulateButton) - buttonContainer.visibility = GONE + runOnUiThread { + val buttonContainer: LinearLayout = findViewById(R.id.layoutSimulateButton) + buttonContainer.visibility = GONE + } } fun statusIdle() { diff --git a/app/src/main/java/net/rec0de/android/watchwitch/adapter/HealthLogAdapter.kt b/app/src/main/java/net/rec0de/android/watchwitch/adapter/HealthLogAdapter.kt index fe9c4ba..f2856f2 100644 --- a/app/src/main/java/net/rec0de/android/watchwitch/adapter/HealthLogAdapter.kt +++ b/app/src/main/java/net/rec0de/android/watchwitch/adapter/HealthLogAdapter.kt @@ -66,7 +66,7 @@ class HealthLogAdapter( when(item) { is DatabaseWrangler.DisplaySample -> { // Title & main value - holder.title.text = "${item.dataType}: ${roundPretty(item.value)}${item.unit}" + holder.title.text = "${item.dataType}: ${roundPretty(item.value)} ${item.unit}" val ico = when { item.dataType.startsWith("Menstrual") -> R.drawable.icon_health_cycletracking @@ -134,7 +134,7 @@ class HealthLogAdapter( // Title & main value holder.title.text = "${item.type}, ${prettyDuration(item.duration)}" - holder.stats.text = "${item.steps} steps, ${roundPretty(item.distance)}km, ${roundPretty(item.energy)} kcal" + holder.stats.text = "${item.steps} steps, ${roundPretty(item.distance)} km, ${roundPretty(item.energy)} kcal" holder.stats.visibility = VISIBLE val ico = ResourcesCompat.getDrawable(holder.view.resources, R.drawable.icon_health_workout, null); diff --git a/app/src/main/java/net/rec0de/android/watchwitch/servicehandlers/messaging/BulletinDistributorService.kt b/app/src/main/java/net/rec0de/android/watchwitch/servicehandlers/messaging/BulletinDistributorService.kt index 2f363b7..545e468 100644 --- a/app/src/main/java/net/rec0de/android/watchwitch/servicehandlers/messaging/BulletinDistributorService.kt +++ b/app/src/main/java/net/rec0de/android/watchwitch/servicehandlers/messaging/BulletinDistributorService.kt @@ -164,6 +164,7 @@ object BulletinDistributorService : AlloyService { else { Intent().also { intent -> intent.action = "net.rec0de.android.watchwitch.chitchat" + intent.setPackage("net.rec0de.android.watchwitch") intent.putExtra("data", "action:${msg.name}") context.sendBroadcast(intent) }