Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share white
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
location share white
Commits
98d04232
Commit
98d04232
authored
Oct 31, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
e95f51cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
LocationShareListUtils.kt
...ase/locationsharewhite/location/LocationShareListUtils.kt
+2
-1
LocationMapActivity.kt
.../locationsharewhite/ui/locationmap/LocationMapActivity.kt
+19
-5
LocationShareActivity.kt
.../base/locationsharewhite/ui/main/LocationShareActivity.kt
+1
-1
No files found.
app/src/main/java/com/base/locationsharewhite/location/LocationShareListUtils.kt
View file @
98d04232
...
...
@@ -100,7 +100,7 @@ object LocationShareListUtils {
}
fun
delete
Viewer
(
device
:
String
,
callBacK
:
(
result
:
Boolean
)
->
Unit
)
{
fun
delete
Share
(
device
:
String
,
callBacK
:
(
result
:
Boolean
)
->
Unit
)
{
Thread
{
val
data
=
JSONObject
()
data
.
put
(
"device"
,
device
)
...
...
@@ -112,6 +112,7 @@ object LocationShareListUtils {
.
put
(
"bp"
,
bp
)
.
toString
()
val
paramJson
=
AESHelper
.
encrypt
(
body
)
LogEx
.
logDebug
(
TAG
,
"paramJson=$paramJson"
)
runCatching
{
val
result
=
ReportUtils
.
doPost
(
deleteUrl
,
HashMap
(),
paramJson
)
LogEx
.
logDebug
(
TAG
,
"result=$result"
)
...
...
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationMapActivity.kt
View file @
98d04232
...
...
@@ -7,7 +7,6 @@ import android.view.LayoutInflater
import
android.view.View
import
android.view.animation.LinearInterpolator
import
androidx.activity.addCallback
import
androidx.core.location.LocationManagerCompat.requestLocationUpdates
import
androidx.lifecycle.lifecycleScope
import
com.base.locationsharewhite.BuildConfig
import
com.base.locationsharewhite.R
...
...
@@ -87,10 +86,26 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
changeViewingBeanPosition
(
true
,
true
,
true
)
},
moreClick
=
{
anchorView
,
item
->
showViewerMoreDialog
(
anchorView
)
moreClick
=
{
anchorView
,
viewingBean
:
ViewingBean
->
showViewerMoreDialog
(
anchorView
,
renameAction
=
{
},
deleteAction
=
{
LocationShareListUtils
.
deleteShare
(
viewingBean
.
device
)
{
result
->
runOnUiThread
{
if
(
result
)
{
toast
(
"delete success"
)
binding
.
ivRefresh
.
callOnClick
()
}
else
{
toast
(
"delete failed"
)
}
}
}
}
)
}
)
binding
.
rvViewing
.
adapter
=
adapter
}
...
...
@@ -366,7 +381,6 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
}
}
override
fun
onPause
()
{
super
.
onPause
()
locationPresenter
.
cancelLocationUpdates
()
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/LocationShareActivity.kt
View file @
98d04232
...
...
@@ -70,7 +70,7 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
})
adapter
.
moreAction
=
{
anchorView
,
viewerBean
->
showViewerMoreDialog
(
anchorView
,
deleteAction
=
{
LocationShareListUtils
.
delete
Viewer
(
viewerBean
.
device
)
{
LocationShareListUtils
.
delete
Share
(
viewerBean
.
device
)
{
runOnUiThread
{
toast
(
it
.
toString
())
}
...
...
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