|
|
@ -62,10 +62,6 @@ public class Pin { |
|
|
|
|
|
|
|
|
|
|
|
public boolean isError = false; |
|
|
|
public boolean isError = false; |
|
|
|
|
|
|
|
|
|
|
|
public PinWatcher getPinWatcher() { |
|
|
|
|
|
|
|
return pinWatcher; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getNewPostsCount() { |
|
|
|
public int getNewPostsCount() { |
|
|
|
if (watchLastCount < 0 || watchNewCount < 0) { |
|
|
|
if (watchLastCount < 0 || watchNewCount < 0) { |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
@ -79,19 +75,11 @@ public class Pin { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Post getLastSeenPost() { |
|
|
|
public Post getLastSeenPost() { |
|
|
|
if (pinWatcher == null) { |
|
|
|
return getPinWatcher().getLastSeenPost(); |
|
|
|
return null; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return pinWatcher.getLastSeenPost(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void updateWatch() { |
|
|
|
public void updateWatch() { |
|
|
|
if (pinWatcher == null) { |
|
|
|
getPinWatcher().update(); |
|
|
|
pinWatcher = new PinWatcher(this); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pinWatcher.update(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void destroyWatcher() { |
|
|
|
public void destroyWatcher() { |
|
|
@ -108,4 +96,12 @@ public class Pin { |
|
|
|
updateWatch(); |
|
|
|
updateWatch(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PinWatcher getPinWatcher() { |
|
|
|
|
|
|
|
if (pinWatcher == null) { |
|
|
|
|
|
|
|
pinWatcher = new PinWatcher(this); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return pinWatcher; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|