Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
e3a4df6b
Commit
e3a4df6b
authored
Apr 06, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wipe out unused method
parent
e5aa863f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
PushManager.kt
app/src/main/java/chat/rocket/android/push/PushManager.kt
+0
-23
No files found.
app/src/main/java/chat/rocket/android/push/PushManager.kt
View file @
e3a4df6b
...
@@ -7,8 +7,6 @@ import android.app.NotificationManager
...
@@ -7,8 +7,6 @@ import android.app.NotificationManager
import
android.app.PendingIntent
import
android.app.PendingIntent
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.content.IntentFilter
import
android.graphics.drawable.Icon
import
android.media.RingtoneManager
import
android.media.RingtoneManager
import
android.os.Build
import
android.os.Build
import
android.os.Bundle
import
android.os.Bundle
...
@@ -286,27 +284,6 @@ class PushManager @Inject constructor(
...
@@ -286,27 +284,6 @@ class PushManager @Inject constructor(
return
Html
.
fromHtml
(
this
as
String
)
return
Html
.
fromHtml
(
this
as
String
)
}
}
//Notification.Builder extensions
@RequiresApi
(
Build
.
VERSION_CODES
.
N
)
private
fun
Notification
.
Builder
.
addReplyAction
(
pushMessage
:
PushMessage
):
Notification
.
Builder
{
val
replyTextHint
=
context
.
getText
(
R
.
string
.
notif_action_reply_hint
)
val
replyRemoteInput
=
android
.
app
.
RemoteInput
.
Builder
(
REMOTE_INPUT_REPLY
)
.
setLabel
(
replyTextHint
)
.
build
()
val
replyIntent
=
Intent
(
context
,
DirectReplyReceiver
::
class
.
java
)
replyIntent
.
action
=
ACTION_REPLY
replyIntent
.
putExtra
(
EXTRA_PUSH_MESSAGE
,
pushMessage
)
val
pendingIntent
=
PendingIntent
.
getBroadcast
(
context
,
randomizer
.
nextInt
(),
replyIntent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
)
val
replyAction
=
Notification
.
Action
.
Builder
(
Icon
.
createWithResource
(
context
,
R
.
drawable
.
ic_reply_black_24px
),
replyTextHint
,
pendingIntent
)
.
addRemoteInput
(
replyRemoteInput
)
.
setAllowGeneratedReplies
(
true
)
.
build
()
this
.
addAction
(
replyAction
)
return
this
}
// NotificationCompat.Builder extensions
// NotificationCompat.Builder extensions
private
fun
NotificationCompat
.
Builder
.
addReplyAction
(
pushMessage
:
PushMessage
):
NotificationCompat
.
Builder
{
private
fun
NotificationCompat
.
Builder
.
addReplyAction
(
pushMessage
:
PushMessage
):
NotificationCompat
.
Builder
{
val
replyTextHint
=
context
.
getText
(
R
.
string
.
notif_action_reply_hint
)
val
replyTextHint
=
context
.
getText
(
R
.
string
.
notif_action_reply_hint
)
...
...
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