Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
开源群组
Signal-Android
Commits
cedab7f5
Commit
cedab7f5
authored
6 years ago
by
Greyson Parrelli
Browse files
Options
Download
Email Patches
Plain Diff
Fix migration of group names when creating Notification Channels.
parent
ca2efcac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java
...crime/securesms/database/helpers/SQLCipherOpenHelper.java
+12
-0
src/org/thoughtcrime/securesms/recipients/Recipient.java
src/org/thoughtcrime/securesms/recipients/Recipient.java
+0
-1
No files found.
src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java
View file @
cedab7f5
...
...
@@ -261,6 +261,18 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
String
displayName
=
NotificationChannels
.
getChannelDisplayNameFor
(
context
,
systemName
,
profileName
,
address
);
boolean
vibrateEnabled
=
vibrateState
==
0
?
TextSecurePreferences
.
isNotificationVibrateEnabled
(
context
)
:
vibrateState
==
1
;
if
(
address
.
isGroup
())
{
try
(
Cursor
groupCursor
=
db
.
rawQuery
(
"SELECT title FROM groups WHERE group_id = ?"
,
new
String
[]
{
address
.
toGroupString
()
}))
{
if
(
groupCursor
!=
null
&&
groupCursor
.
moveToFirst
())
{
String
title
=
groupCursor
.
getString
(
groupCursor
.
getColumnIndexOrThrow
(
"title"
));
if
(!
TextUtils
.
isEmpty
(
title
))
{
displayName
=
title
;
}
}
}
}
String
channelId
=
NotificationChannels
.
createChannelFor
(
context
,
address
,
displayName
,
messageSoundUri
,
vibrateEnabled
);
ContentValues
values
=
new
ContentValues
(
1
);
...
...
This diff is collapsed.
Click to expand it.
src/org/thoughtcrime/securesms/recipients/Recipient.java
View file @
cedab7f5
...
...
@@ -17,7 +17,6 @@
*/
package
org.thoughtcrime.securesms.recipients
;
import
android.app.NotificationChannel
;
import
android.content.Context
;
import
android.graphics.drawable.Drawable
;
import
android.net.Uri
;
...
...
This diff is collapsed.
Click to expand it.
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