Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Silence-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
270
Issues
270
List
Boards
Labels
Service Desk
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Silence
Silence-Android
Commits
ae0f7fb0
Commit
ae0f7fb0
authored
Apr 17, 2020
by
Bastien Le Querrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use default SIM to send drafts
parent
3d65239e
Pipeline
#166
failed with stages
in 40 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/org/smssecure/smssecure/ConversationListFragment.java
src/org/smssecure/smssecure/ConversationListFragment.java
+4
-5
No files found.
src/org/smssecure/smssecure/ConversationListFragment.java
View file @
ae0f7fb0
...
...
@@ -349,9 +349,8 @@ public class ConversationListFragment extends Fragment
recipients
=
getListAdapter
().
getRecipientsFromThreadId
(
threadId
);
if
(
recipients
!=
null
)
{
int
subscriptionId
=
SubscriptionManagerCompat
.
getDefaultMessagingSubscriptionId
().
or
(-
1
);
isSingleConversation
=
recipients
.
isSingleRecipient
()
&&
!
recipients
.
isGroupRecipient
();
isSecureDestination
=
isSingleConversation
&&
SessionUtil
.
hasSession
(
context
,
masterSecret
,
recipients
.
getPrimaryRecipient
().
getNumber
(),
subscriptionId
);
isSecureDestination
=
isSingleConversation
&&
SessionUtil
.
hasSession
(
context
,
masterSecret
,
recipients
.
getPrimaryRecipient
().
getNumber
(),
recipients
.
getDefaultSubscriptionId
()
);
Log
.
w
(
TAG
,
"Number of drafts: "
+
drafts
.
size
());
if
(
drafts
.
size
()
>
1
&&
!
drafts
.
get
(
1
).
getType
().
equals
(
DraftDatabase
.
Draft
.
TEXT
))
{
...
...
@@ -386,9 +385,9 @@ public class ConversationListFragment extends Fragment
private
void
sendTextDraft
(
DraftDatabase
.
Draft
draft
,
long
threadId
)
{
OutgoingTextMessage
message
;
if
(
isSecureDestination
)
{
message
=
new
OutgoingEncryptedMessage
(
recipients
,
draft
.
getValue
(),
-
1
);
message
=
new
OutgoingEncryptedMessage
(
recipients
,
draft
.
getValue
(),
recipients
.
getDefaultSubscriptionId
()
);
}
else
{
message
=
new
OutgoingTextMessage
(
recipients
,
draft
.
getValue
(),
-
1
);
message
=
new
OutgoingTextMessage
(
recipients
,
draft
.
getValue
(),
recipients
.
getDefaultSubscriptionId
()
);
}
MessageSender
.
send
(
context
,
masterSecret
,
message
,
threadId
,
false
);
}
...
...
@@ -401,7 +400,7 @@ public class ConversationListFragment extends Fragment
forcedValue
!=
null
?
forcedValue
:
""
,
attachment
,
System
.
currentTimeMillis
(),
-
1
,
recipients
.
getDefaultSubscriptionId
()
,
ThreadDatabase
.
DistributionTypes
.
BROADCAST
);
if
(
isSecureDestination
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment