|
|
@@ -3,6 +3,8 @@
|
|
|
*/
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.member;
|
|
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.LoginBean;
|
|
|
import kr.co.zumo.app.lifeplus.model.Model;
|
|
|
@@ -79,7 +81,7 @@ public class MemberBlockModel extends Model {
|
|
|
return false;
|
|
|
}
|
|
|
// 기간이 지났음
|
|
|
- long toMillis = Formatter.dateStringToMillis(LoginBean.DATE_FORMAT, lockTo);
|
|
|
+ long toMillis = Formatter.dateStringToMillis(LoginBean.DATE_FORMAT, lockTo) + TimeUnit.DAYS.toMillis(1); // 당일 24시까지 잠기므로 24시간 더해줌
|
|
|
long todayMillis = System.currentTimeMillis();
|
|
|
return toMillis < todayMillis;
|
|
|
}
|
|
|
@@ -128,4 +130,13 @@ public class MemberBlockModel extends Model {
|
|
|
public int getButtonText() {
|
|
|
return canUnlock() ? R.string.block_member_unlock : R.string.confirm;
|
|
|
}
|
|
|
+
|
|
|
+ public boolean isDurationVisible() {
|
|
|
+ if (isUnlimited()) {
|
|
|
+ // 기간이 없는 경우 영구 잠금
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return canUnlock() == false;
|
|
|
+ }
|
|
|
}
|