Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
a4b1e70e
Commit
a4b1e70e
authored
Dec 24, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
ccb29f83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+24
-13
No files found.
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
a4b1e70e
...
@@ -120,6 +120,28 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -120,6 +120,28 @@ public class UserPresenter extends BasePresenter<UserApi> {
@Override
@Override
public
void
onSuccess
(
GatewayInfoBean
gatewayInfoBean
)
{
public
void
onSuccess
(
GatewayInfoBean
gatewayInfoBean
)
{
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
Gateway
.
setGatewayInfoBean
(
gatewayInfoBean
);
submitDeviceInfo
();
getCustomerMsg
(
action
);
}
@Override
public
void
onError
(
int
code
,
String
msg
)
{
view
.
onHttpError
(
action
,
msg
);
}
@Override
public
void
onFinish
()
{
}
});
}
public
void
submitDeviceInfo
()
{
Observable
.
just
(
true
)
.
subscribeOn
(
Schedulers
.
io
())
.
map
(
aBoolean
->
{
TrackEventHelper
.
logEvent
(
TrackEvent
.
Api
.
GATEWAY_UPDATED
);
TrackEventHelper
.
logEvent
(
TrackEvent
.
Api
.
GATEWAY_UPDATED
);
if
(!
PreferencesManager
.
get
().
getBoolean
(
"device_info_uploaded"
,
false
))
{
if
(!
PreferencesManager
.
get
().
getBoolean
(
"device_info_uploaded"
,
false
))
{
TrackEventHelper
.
logEvent
(
new
Gson
().
toJson
(
DeviceUtils
.
getInstance
().
getDeviceInfo
()));
TrackEventHelper
.
logEvent
(
new
Gson
().
toJson
(
DeviceUtils
.
getInstance
().
getDeviceInfo
()));
...
@@ -137,20 +159,9 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -137,20 +159,9 @@ public class UserPresenter extends BasePresenter<UserApi> {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
TrackEventHelper
.
logEvent
(
jsonObject
.
toString
());
TrackEventHelper
.
logEvent
(
jsonObject
.
toString
());
return
true
;
}).
subscribe
();
getCustomerMsg
(
action
);
// EventBus.getDefault().post(ActionEnum.GATEWAY_UPDATED);
}
@Override
public
void
onError
(
int
code
,
String
msg
)
{
view
.
onHttpError
(
action
,
msg
);
}
@Override
public
void
onFinish
()
{
}
});
}
}
...
...
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