Skip to content

Commit 951625c

Browse files
update: can see decrypted messages
1 parent 484910e commit 951625c

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

app/src/main/java/com/example/sw0b_001/data/Composers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ object Composers {
110110
val body = splitMessage.subList(6, splitMessage.size).joinToString(separator = "\n")
111111

112112
return EmailContent(
113-
// mutableStateOf(to),
113+
to =mutableStateOf(alias),
114114
cc = mutableStateOf(cc),
115115
bcc = mutableStateOf(bcc),
116116
subject = mutableStateOf(subject),

app/src/main/java/com/example/sw0b_001/ui/views/details/EmailDetailsView.kt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.example.sw0b_001.ui.views.details
22

3+
import android.R.attr.text
34
import android.graphics.Bitmap
45
import android.graphics.BitmapFactory
56
import android.util.Base64
@@ -122,7 +123,26 @@ fun EmailDetailsView(
122123
}
123124
}
124125
Platforms.ServiceTypes.BRIDGE_INCOMING.name -> {
125-
//
126+
Composers.EmailComposeHandler
127+
.decomposeBridgeMessage(
128+
message.encryptedContent!!,
129+
).apply {
130+
from = message.fromAccount ?: "Bridge Message"
131+
to = this.to.value
132+
cc = this.cc.value
133+
bcc = this.bcc.value
134+
subject = this.subject.value
135+
body = this.body.value
136+
date = message.date
137+
138+
this.image.value?.let { byteArray ->
139+
imageBitmap = BitmapFactory.decodeByteArray(
140+
byteArray,
141+
0,
142+
byteArray.size
143+
)
144+
}
145+
}
126146
}
127147
}
128148
}

0 commit comments

Comments
 (0)