adding some Threema related preparation for #624, needs more work

This commit is contained in:
tibbi 2021-01-10 16:18:08 +01:00
parent 78aa887a9f
commit 8249f3bca7
2 changed files with 12 additions and 0 deletions

View File

@ -559,6 +559,14 @@ class ViewContactActivity : ContactActivity() {
showSocialActions(key.id)
}
}
if (value.toLowerCase() == THREEMA) {
contact_source_image.setImageDrawable(getPackageDrawable(THREEMA_PACKAGE))
contact_source_image.beVisible()
contact_source_image.setOnClickListener {
showSocialActions(key.id)
}
}
}
}

View File

@ -353,6 +353,10 @@ fun Context.getSocialActions(id: Int): ArrayList<SocialAction> {
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.call" -> SOCIAL_VOICE_CALL
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.call.video" -> SOCIAL_VIDEO_CALL
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.profile" -> SOCIAL_MESSAGE
// Threema
"vnd.android.cursor.item/vnd.ch.threema.app.profile" -> SOCIAL_MESSAGE
"vnd.android.cursor.item/vnd.ch.threema.app.call" -> SOCIAL_VOICE_CALL
else -> return@queryCursor
}