Skip to content

Commit 6fb7796

Browse files
committed
Fixes countdown calculation.
1 parent a5e27e8 commit 6fb7796

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mobile/src/main/java/com/hackfsu/mobile/android/app/fragment/FeedFragment.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ public void onDataReady(List<CountdownModel> dataSet) {
142142
if(dataSet.size() > 0) {
143143
final CountdownModel first = dataSet.get(0);
144144

145-
long until = (System.currentTimeMillis() - first.getStartTime().getTimeInMillis());
146-
145+
long until = (first.getStartTime().getTimeInMillis() - System.currentTimeMillis());
147146
Log.d("initNextTimer()", "ms until: " + until);
147+
until = Math.abs(until);
148+
148149

149150
new CountDownTimer(until, 1000) {
150151
@Override

0 commit comments

Comments
 (0)