From fc2629fc10e3fb26b3365090c6c9001bec4f80a1 Mon Sep 17 00:00:00 2001 From: lh <1209405678@qq.com> Date: Fri, 23 Feb 2018 13:56:39 +0800 Subject: [PATCH] no message --- .../ytzh/work/tablepoultry/TablepoultryActivity.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java index bf3da88..f5968dc 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java +++ b/app/src/main/java/com/qhclh/ytzh/work/tablepoultry/TablepoultryActivity.java @@ -68,10 +68,19 @@ public class TablepoultryActivity extends BaseActivity implements CalendarDialog } + private boolean flag=false; @Override protected void onResume() { super.onResume(); -// GetAllWeatherAreas(System.currentTimeMillis()); + if (flag==false) { + GetAllWeatherAreas(System.currentTimeMillis()); + } + } + + @Override + protected void onDestroy() { + super.onDestroy(); + flag= false; } private List rpcList; @@ -126,6 +135,7 @@ public class TablepoultryActivity extends BaseActivity implements CalendarDialog @Override public void onStartCalendarClick(Date date) { GetAllWeatherAreas(date.getTime()); + flag = true; EventBus.getDefault().postSticky(new ChoseEvent(date.getTime())); }