Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StatInfo_1
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenyuling
StatInfo_1
Commits
7c440438
Commit
7c440438
authored
Jan 26, 2024
by
chenyuling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"数据长度不变也进行更新数据"
parent
75dcf957
Pipeline
#2292
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
43 deletions
+40
-43
MainActivity.java
...rc/main/java/com/srthinker/statinfo/uis/MainActivity.java
+40
-43
No files found.
app/src/main/java/com/srthinker/statinfo/uis/MainActivity.java
View file @
7c440438
...
@@ -251,7 +251,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
...
@@ -251,7 +251,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
if
(
type
==
ENTER_TYPE
){
if
(
type
==
ENTER_TYPE
){
if
(
passEntities
!=
null
)
{
if
(
passEntities
!=
null
)
{
int
size
=
passEntities
.
size
();
int
size
=
passEntities
.
size
();
if
(
size
!=
lastEnterSize
){
/*//更新进出情况
/*//更新进出情况
//enterBeans = passEntities; 全局变量直接赋值会出现问题
//enterBeans = passEntities; 全局变量直接赋值会出现问题
enterBeans.clear();
enterBeans.clear();
...
@@ -274,7 +273,7 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
...
@@ -274,7 +273,7 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
//更新分组情况(是否要根据id去重)
//更新分组情况(是否要根据id去重)
groupEnterHashMap
=
getGroupSizeHashMap
(
passEntities
);
groupEnterHashMap
=
getGroupSizeHashMap
(
passEntities
);
updatePresentSize
(
groupEnterHashMap
,
groupLeaveHashMap
);
updatePresentSize
(
groupEnterHashMap
,
groupLeaveHashMap
);
}
}
}
}
else
if
(
type
==
LEAVE_TYPE
){
}
else
if
(
type
==
LEAVE_TYPE
){
...
@@ -282,7 +281,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
...
@@ -282,7 +281,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
if
(
passEntities
!=
null
)
{
if
(
passEntities
!=
null
)
{
int
size
=
passEntities
.
size
();
int
size
=
passEntities
.
size
();
//进出有变化时才更新
//进出有变化时才更新
if
(
size
!=
lastLeaveSize
){
/*leaveBeans.clear();
/*leaveBeans.clear();
leaveBeans.addAll(passEntities);
leaveBeans.addAll(passEntities);
//更新进出情况
//更新进出情况
...
@@ -305,7 +303,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
...
@@ -305,7 +303,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
groupLeaveHashMap
=
getGroupSizeHashMap
(
passEntities
);
groupLeaveHashMap
=
getGroupSizeHashMap
(
passEntities
);
updatePresentSize
(
groupEnterHashMap
,
groupLeaveHashMap
);
updatePresentSize
(
groupEnterHashMap
,
groupLeaveHashMap
);
}
}
}
}
}
}
}
...
...
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