Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
a67c2931
Commit
a67c2931
authored
Jan 06, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation warning in UndoSnackbarManager
parent
0fc9c6fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/main/scala/com/github/shadowsocks/widget/UndoSnackbarManager.scala
...a/com/github/shadowsocks/widget/UndoSnackbarManager.scala
+5
-5
No files found.
src/main/scala/com/github/shadowsocks/widget/UndoSnackbarManager.scala
View file @
a67c2931
...
@@ -22,7 +22,6 @@ package com.github.shadowsocks.widget
...
@@ -22,7 +22,6 @@ package com.github.shadowsocks.widget
import
android.support.design.widget.Snackbar
import
android.support.design.widget.Snackbar
import
android.view.View
import
android.view.View
import
com.github.shadowsocks.R
import
com.github.shadowsocks.R
import
scala.collection.mutable.ArrayBuffer
import
scala.collection.mutable.ArrayBuffer
...
@@ -56,10 +55,11 @@ class UndoSnackbarManager[T](view: View, undo: Iterator[(Int, T)] => Unit,
...
@@ -56,10 +55,11 @@ class UndoSnackbarManager[T](view: View, undo: Iterator[(Int, T)] => Unit,
val
count
=
recycleBin
.
length
val
count
=
recycleBin
.
length
last
=
Snackbar
last
=
Snackbar
.
make
(
view
,
view
.
getResources
.
getQuantityString
(
R
.
plurals
.
removed
,
count
,
count
:
Integer
),
Snackbar
.
LENGTH_LONG
)
.
make
(
view
,
view
.
getResources
.
getQuantityString
(
R
.
plurals
.
removed
,
count
,
count
:
Integer
),
Snackbar
.
LENGTH_LONG
)
.
setCallback
(
removedCallback
).
setAction
(
R
.
string
.
undo
,
(
_
=>
{
.
addCallback
(
removedCallback
)
undo
(
recycleBin
.
reverseIterator
)
.
setAction
(
R
.
string
.
undo
,
(
_
=>
{
recycleBin
.
clear
undo
(
recycleBin
.
reverseIterator
)
})
:
View.OnClickListener
)
recycleBin
.
clear
})
:
View.OnClickListener
)
last
.
show
()
last
.
show
()
}
}
...
...
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