Skip to content

Commit 8249f3b

Browse files
committed
adding some Threema related preparation for #624, needs more work
1 parent 78aa887 commit 8249f3b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,14 @@ class ViewContactActivity : ContactActivity() {
559559
showSocialActions(key.id)
560560
}
561561
}
562+
563+
if (value.toLowerCase() == THREEMA) {
564+
contact_source_image.setImageDrawable(getPackageDrawable(THREEMA_PACKAGE))
565+
contact_source_image.beVisible()
566+
contact_source_image.setOnClickListener {
567+
showSocialActions(key.id)
568+
}
569+
}
562570
}
563571
}
564572

app/src/main/kotlin/com/simplemobiletools/contacts/pro/extensions/Context.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ fun Context.getSocialActions(id: Int): ArrayList<SocialAction> {
353353
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.call" -> SOCIAL_VOICE_CALL
354354
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.call.video" -> SOCIAL_VIDEO_CALL
355355
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile" -> SOCIAL_MESSAGE
356+
357+
// Threema
358+
"vnd.android.cursor.item/vnd.ch.threema.app.profile" -> SOCIAL_MESSAGE
359+
"vnd.android.cursor.item/vnd.ch.threema.app.call" -> SOCIAL_VOICE_CALL
356360
else -> return@queryCursor
357361
}
358362

0 commit comments

Comments
 (0)