Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
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
abook_android
abook_check
Commits
78c5c903
Commit
78c5c903
authored
a year ago
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement auto sync for push message
parent
3ec8094a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
16 deletions
+34
-16
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
+16
-11
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+17
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+1
-2
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ShowPushMessageDailogActivity.java
View file @
78c5c903
...
...
@@ -55,21 +55,26 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
ErrorMessage
.
showErrorMessageToast
(
ShowPushMessageDailogActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_no_operation
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
if
(
operationDto
.
needSyncFlg
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
ShowPushMessageDailogActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_not_updated
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
OperationListActivity
operationListActivity
=
ActivityHandlingHelper
.
getInstance
().
getPreviousOperationListActivity
();
if
(
operationListActivity
!=
null
)
{
operationListActivity
.
startTaskDirectionOrReportView
(
operationDto
);
}
else
{
if
(
operationListActivity
!=
null
&&
operationListActivity
.
needAutoSync
())
{
operationListActivity
.
autoSyncOperationId
(
operationId
);
return
;
}
if
(
operationDto
.
needSyncFlg
)
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
ShowPushMessageDailogActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_not_list
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
R
.
string
.
msg_routineTask_report_disable_not_updated
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
else
{
if
(
operationListActivity
!=
null
)
{
operationListActivity
.
startTaskDirectionOrReportView
(
operationDto
);
}
else
{
// リソースパターンの適用
ErrorMessage
.
showErrorMessageToast
(
ShowPushMessageDailogActivity
.
this
,
PatternStringUtil
.
patternToInt
(
getApplicationContext
(),
R
.
string
.
msg_routineTask_report_disable_not_list
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
78c5c903
...
...
@@ -498,7 +498,6 @@ public class OperationListActivity extends OperationActivity {
}
}
}
needSyncOperationList
.
addAll
(
mOperationDao
.
getAllOperation
());
if
(
needSyncOperationList
.
size
()
>
0
)
{
categoryBatchSync
(
needSyncOperationList
);
}
else
{
...
...
@@ -1444,8 +1443,7 @@ public class OperationListActivity extends OperationActivity {
return
;
}
if
(
needAutoSync
())
{
autoSyncOpenOperationId
=
operationId
;
autoSyncOperation
();
autoSyncOperationId
(
operationId
);
return
;
}
if
(
operationDto
.
needSyncFlg
)
{
...
...
@@ -2450,6 +2448,9 @@ public class OperationListActivity extends OperationActivity {
return
(
isAutoSync
()
&&
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
());
}
/**
* Run refresh data and batch sync if need
*/
public
void
autoSyncOperation
()
{
if
(
isAutoSyncing
)
{
return
;
...
...
@@ -2469,6 +2470,19 @@ public class OperationListActivity extends OperationActivity {
});
}
/**
* Auto sync and open operation if success
* @param operationId
*/
public
void
autoSyncOperationId
(
Long
operationId
)
{
autoSyncOpenOperationId
=
operationId
;
autoSyncOperation
();
}
/**
* Auto sync done
* @param isSuccess
*/
public
void
autoSyncOperationDone
(
boolean
isSuccess
)
{
isAutoSyncing
=
false
;
closeProgressPopup
();
...
...
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
View file @
78c5c903
...
...
@@ -265,8 +265,7 @@ public abstract class OperationListHelper {
public
void
onClickReport
(
OperationDto
operationDto
)
{
if
(
mAppActivity
.
needAutoSync
())
{
mAppActivity
.
autoSyncOpenOperationId
=
operationDto
.
operationId
;
mAppActivity
.
autoSyncOperation
();
mAppActivity
.
autoSyncOperationId
(
operationDto
.
operationId
);
return
;
}
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
...
...
This diff is collapsed.
Click to expand it.
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