diff --git a/app/build.gradle b/app/build.gradle index 41baa2f..fab7a10 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,7 +14,7 @@ buildscript { } dependencies { // Main Android gradle plugin allows building of the entire play toolchain - classpath 'com.android.tools.build:gradle:2.2.0-beta3' + classpath 'com.android.tools.build:gradle:2.2.2' // Fabric repository for Crashlytics. classpath 'io.fabric.tools:gradle:1.+' // Adds tasks to auto publish apks to Google App Store. https://github.com/Triple-T/gradle-play-publisher diff --git a/app/src/main/assets/whatsnew_minor.txt b/app/src/main/assets/whatsnew_minor.txt index 2454612..3a1953b 100644 --- a/app/src/main/assets/whatsnew_minor.txt +++ b/app/src/main/assets/whatsnew_minor.txt @@ -1,3 +1,10 @@ +September 2, 2016 +=== +‣ Booking from the calendar works +‣ Joining from the calendar works +‣ Leaving from the calendar works +‣ If you're not logged in, it will ask you to + August 14, 2016 === ‣ Scrolling downwards on the grid no longer randomly triggers pull to refresh diff --git a/app/src/main/assets/whatsnew_thisversion.txt b/app/src/main/assets/whatsnew_thisversion.txt index 00b266e..e112395 100644 --- a/app/src/main/assets/whatsnew_thisversion.txt +++ b/app/src/main/assets/whatsnew_thisversion.txt @@ -1,6 +1,3 @@ -September 2, 2016 +October 22, 2016 === -‣ Booking from the calendar works -‣ Joining from the calendar works -‣ Leaving from the calendar works -‣ If you're not logged in, it will ask you to +‣ Fixed issue with date not being available which crashed the app diff --git a/app/src/main/java/com/objectivetruth/uoitlibrarybooking/data/models/usermodel/MyAccountParser.java b/app/src/main/java/com/objectivetruth/uoitlibrarybooking/data/models/usermodel/MyAccountParser.java index 509df7c..a3533aa 100644 --- a/app/src/main/java/com/objectivetruth/uoitlibrarybooking/data/models/usermodel/MyAccountParser.java +++ b/app/src/main/java/com/objectivetruth/uoitlibrarybooking/data/models/usermodel/MyAccountParser.java @@ -98,10 +98,11 @@ static private ArrayList _getBookingsList(MyAccountBookingType ArrayList returnArrayList = new ArrayList(); // Start at 2 because 0 is the empty string and 1 is the headers in the table + // also -1 on the length because the last row is a which isn't a full row // Example: " {"", "RoomDateFromTo - for(int i = 2; i < trStore.length; i++) { + for(int i = 2; i < trStore.length - 1; i++) { MyAccountBooking returnMyAccountBooking = new MyAccountBooking(); String[] tdElements = trStore[2].split(" _getBookingsList(MyAccountBookingType findStringFromStringBetweenSearchTerms(tdElements[2], ">", "", "", " 0; irow--) { TimeCell suspect = calendarDay.timeCells.get(_convertRowAndColumnToTimeCellIndex(irow, column)); if(suspect.timeCellType == BOOKING_CONFIRMED) { diff --git a/app/src/main/java/com/objectivetruth/uoitlibrarybooking/userinterface/myaccount/myaccountloaded/BookingsAdapter.java b/app/src/main/java/com/objectivetruth/uoitlibrarybooking/userinterface/myaccount/myaccountloaded/BookingsAdapter.java index 2ce4d27..8700d35 100644 --- a/app/src/main/java/com/objectivetruth/uoitlibrarybooking/userinterface/myaccount/myaccountloaded/BookingsAdapter.java +++ b/app/src/main/java/com/objectivetruth/uoitlibrarybooking/userinterface/myaccount/myaccountloaded/BookingsAdapter.java @@ -8,6 +8,7 @@ import android.widget.TextView; import com.objectivetruth.uoitlibrarybooking.R; import com.objectivetruth.uoitlibrarybooking.data.models.usermodel.MyAccountBooking; +import timber.log.Timber; import java.util.ArrayList; @@ -47,7 +48,12 @@ public View getView(int position, View convertView, ViewGroup parent) { viewHolder.textView.setText(myAccountBooking.date); break; case 2: - String startAndEndTime = myAccountBooking.startTime + "-" + myAccountBooking.endTime; + String startAndEndTime = myAccountBooking.startTime; + if(startAndEndTime == null) { + startAndEndTime = ""; + Timber.w(new Throwable(new NullPointerException()), + "Starttime was null, which is never expected"); + } viewHolder.textView.setText(startAndEndTime); break; default: