diff --git a/android/app/build.gradle b/android/app/build.gradle index 14dbd5a..defcddc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -82,8 +82,8 @@ android { applicationId "com.micahlindley.offsides" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 35 - versionName "0.7.1" + versionCode 36 + versionName "0.7.2" } signingConfigs { debug { diff --git a/android/app/release/offsides-0-7-1.apk b/android/app/release/app-release.apk similarity index 96% rename from android/app/release/offsides-0-7-1.apk rename to android/app/release/app-release.apk index 0fce15c..dfc9716 100644 Binary files a/android/app/release/offsides-0-7-1.apk and b/android/app/release/app-release.apk differ diff --git a/android/app/release/output-metadata.json b/android/app/release/output-metadata.json index 43faa78..c560411 100644 --- a/android/app/release/output-metadata.json +++ b/android/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 35, - "versionName": "0.7.1", + "versionCode": 36, + "versionName": "0.7.2", "outputFile": "app-release.apk" } ], diff --git a/docs/latest.json b/docs/latest.json index a8f4ae8..7d65204 100644 --- a/docs/latest.json +++ b/docs/latest.json @@ -1,4 +1,4 @@ { - "latestVersion": "0.7.1", - "changelog": "This update includes minor bugfixes as well as support for viewing and voting on polls." + "latestVersion": "0.7.2", + "changelog": "This update includes a bugfix for the issue that caused app crashes when polls were viewed." } diff --git a/package-lock.json b/package-lock.json index aae0df3..928fbe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "offsides", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "offsides", - "version": "0.7.1", + "version": "0.7.2", "dependencies": { "@devvie/bottom-sheet": "^0.3.0", "@eabdullazyanov/react-native-sms-user-consent": "^1.2.0", diff --git a/package.json b/package.json index 312c40a..77b7864 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "offsides", - "version": "0.7.1", + "version": "0.7.2", "private": true, "scripts": { "android": "react-native run-android", diff --git a/src/components/Poll.jsx b/src/components/Poll.jsx index df2e24d..1b2fe56 100644 --- a/src/components/Poll.jsx +++ b/src/components/Poll.jsx @@ -24,6 +24,8 @@ function Poll({ poll }) { API.voteOnPoll(poll.id, choiceIndex); }; + console.log(poll); + if (!poll) return null; return ( @@ -44,13 +46,19 @@ function Poll({ poll }) { padding: 10, borderRadius: 10, }}> - - {option.text} - - {option.count && ( + {!!option?.text ? ( + + {option.text} + + ) : ( + <> + )} + {!!option?.count ? ( {option.count} votes + ) : ( + <> )} diff --git a/src/screens/HomeScreen.jsx b/src/screens/HomeScreen.jsx index cdcb518..ea98e16 100644 --- a/src/screens/HomeScreen.jsx +++ b/src/screens/HomeScreen.jsx @@ -127,6 +127,7 @@ function HomeScreen({ navigation, route }) { setPosts([]); API.getGroupPosts(override || params.groupID, postCategory).then( res => { + console.log('GET GROUP POSTS'); if (res.posts) { setPosts(res.posts.filter(i => i.id)); setCursor(res.cursor); @@ -141,6 +142,7 @@ function HomeScreen({ navigation, route }) { postCategory, cursor, ).then(res => { + console.log('GET POSTS'); if (res.posts) { setPosts(posts.concat(res.posts.filter(i => i.id))); setCursor(res.cursor);