From 9be61e3e9d6e0136c51a80d9666057f96423f63c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2019 03:36:57 +0530 Subject: [PATCH 01/54] chore(deps): bump rxjava from 2.2.12 to 2.2.13 (#2375) Bumps [rxjava](https://github.com/ReactiveX/RxJava) from 2.2.12 to 2.2.13. - [Release notes](https://github.com/ReactiveX/RxJava/releases) - [Changelog](https://github.com/ReactiveX/RxJava/blob/v2.2.13/CHANGES.md) - [Commits](https://github.com/ReactiveX/RxJava/compare/v2.2.12...v2.2.13) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index bb0ab2d95b..6418233a95 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -185,7 +185,7 @@ dependencies { // RxJava implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0' - implementation 'io.reactivex.rxjava2:rxjava:2.2.12' + implementation 'io.reactivex.rxjava2:rxjava:2.2.13' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2' // Picasso From 2bb6a2acb7c740e03d707bc436b32a6005335d3d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2019 11:31:00 +0530 Subject: [PATCH 02/54] chore(deps): bump logging-interceptor from 4.2.1 to 4.2.2 (#2380) Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/square/okhttp/releases) - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/okhttp/compare/parent-4.2.1...parent-4.2.2) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 6418233a95..489ef3d9c7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -175,7 +175,7 @@ dependencies { implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6" implementation 'com.github.jasminb:jsonapi-converter:0.9' - implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1' + implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2' implementation 'com.squareup.retrofit2:retrofit:2.6.2' implementation 'com.squareup.retrofit2:converter-jackson:2.6.2' From ab226a924c1b23ce4cff6e7b968d57d0d883d2ef Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2019 11:55:30 +0530 Subject: [PATCH 03/54] chore(deps): bump stripe-android from 11.1.4 to 11.2.0 (#2383) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 11.1.4 to 11.2.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v11.1.4...v11.2.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 489ef3d9c7..eac2faf75d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:11.1.4' + implementation 'com.stripe:stripe-android:11.2.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From bde2e9f6ff36b981af4f8d70cf41a033dedc9892 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2019 13:09:43 +0530 Subject: [PATCH 04/54] chore(deps): bump material from 1.1.0-alpha10 to 1.1.0-beta01 (#2381) Bumps [material](https://github.com/material-components/material-components-android) from 1.1.0-alpha10 to 1.1.0-beta01. - [Release notes](https://github.com/material-components/material-components-android/releases) - [Commits](https://github.com/material-components/material-components-android/compare/1.1.0-alpha10...1.1.0-beta01) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index eac2faf75d..ea400edb00 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -139,7 +139,7 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04' - implementation 'com.google.android.material:material:1.1.0-alpha10' + implementation 'com.google.android.material:material:1.1.0-beta01' implementation "androidx.browser:browser:1.0.0" implementation 'androidx.exifinterface:exifinterface:1.0.0' implementation "androidx.lifecycle:lifecycle-extensions:${lifecycle_version}" From 3478bc976352889701fb10c5458bddb9f250c195 Mon Sep 17 00:00:00 2001 From: Shubham Pathak Date: Wed, 9 Oct 2019 07:26:15 +0530 Subject: [PATCH 05/54] fix: Notification dot visibility logic (#2379) --- .../java/org/fossasia/openevent/general/event/EventsFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt index 66fda8c382..9a49db202c 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt @@ -143,8 +143,6 @@ class EventsFragment : Fragment(), BottomIconDoubleClick { rootView.notification.isVisible = eventsViewModel.isLoggedIn() rootView.notificationToolbar.isVisible = eventsViewModel.isLoggedIn() - rootView.newNotificationDot.isVisible = eventsViewModel.isLoggedIn() - rootView.newNotificationDotToolbar.isVisible = eventsViewModel.isLoggedIn() eventsViewModel.loadLocation() if (rootView.locationTextView.text == getString(R.string.enter_location)) { From 36e22ac9b98ff7e3e2c4c255c779e4b7fd730a83 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2019 10:01:29 +0530 Subject: [PATCH 06/54] chore(deps): bump roomVersion from 2.1.0 to 2.2.0 (#2386) Bumps `roomVersion` from 2.1.0 to 2.2.0. Updates `room-runtime` from 2.1.0 to 2.2.0 Updates `room-rxjava2` from 2.1.0 to 2.2.0 Updates `room-compiler` from 2.1.0 to 2.2.0 Updates `room-testing` from 2.1.0 to 2.2.0 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index ea400edb00..afa08ffbde 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -126,7 +126,7 @@ repositories { dependencies { def lifecycle_version = "2.2.0-alpha05" def koin_version = "2.0.1" - def roomVersion = "2.1.0" + def roomVersion = "2.2.0" def ktx_version = "1.1.0" def ktx2_version = "2.1.0" def nav_version = "2.1.0" From 3b729dc218dded8afbfb58890251cf71bbd4c735 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2019 10:01:43 +0530 Subject: [PATCH 07/54] chore(deps): bump recyclerview from 1.1.0-beta04 to 1.1.0-beta05 (#2387) Bumps recyclerview from 1.1.0-beta04 to 1.1.0-beta05. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index afa08ffbde..90f9cdfed1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -138,7 +138,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04' + implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05' implementation 'com.google.android.material:material:1.1.0-beta01' implementation "androidx.browser:browser:1.0.0" implementation 'androidx.exifinterface:exifinterface:1.0.0' From b18251a4ead7fbf4a7e972a540b6c6e8a9929ae8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2019 10:02:04 +0530 Subject: [PATCH 08/54] =?UTF-8?q?chore(deps):=20bump=20lifecycle=5Fversion?= =?UTF-8?q?=20from=202.2.0-alpha05=20to=202.2.0=E2=80=A6=20(#2385)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `lifecycle_version` from 2.2.0-alpha05 to 2.2.0-beta01. Updates `lifecycle-extensions` from 2.2.0-alpha05 to 2.2.0-beta01 Updates `lifecycle-common-java8` from 2.2.0-alpha05 to 2.2.0-beta01 Updates `lifecycle-reactivestreams` from 2.2.0-alpha05 to 2.2.0-beta01 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 90f9cdfed1..6d14d515fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -124,7 +124,7 @@ repositories { } dependencies { - def lifecycle_version = "2.2.0-alpha05" + def lifecycle_version = "2.2.0-beta01" def koin_version = "2.0.1" def roomVersion = "2.2.0" def ktx_version = "1.1.0" From 8591fb64c6c1f90d2e3f97d53f142716d2eff7bf Mon Sep 17 00:00:00 2001 From: Harshit Khandelwal Date: Thu, 10 Oct 2019 21:52:26 +0530 Subject: [PATCH 09/54] chore(deps): Bump spotless to 3.25.0 and fix errors (#2388) --- app/build.gradle | 2 +- .../search/location/GeoLocationViewModel.kt | 2 +- .../search/location/LocationServiceImpl.kt | 4 +- .../openevent/general/MainActivity.kt | 6 +- .../openevent/general/OpenEventDatabase.kt | 8 +- .../general/about/AboutEventFragment.kt | 12 +- .../general/about/AboutEventViewModel.kt | 2 +- .../general/attendees/AttendeeFragment.kt | 136 +++++++++--------- .../attendees/AttendeeRecyclerAdapter.kt | 4 +- .../general/attendees/AttendeeViewHolder.kt | 80 +++++------ .../general/attendees/AttendeeViewModel.kt | 4 +- .../openevent/general/auth/AuthApi.kt | 2 +- .../openevent/general/auth/AuthFragment.kt | 8 +- .../openevent/general/auth/AuthViewModel.kt | 2 +- .../general/auth/EditProfileFragment.kt | 44 +++--- .../general/auth/EditProfileViewModel.kt | 4 +- .../openevent/general/auth/LoginFragment.kt | 10 +- .../openevent/general/auth/LoginViewModel.kt | 4 +- .../openevent/general/auth/ProfileFragment.kt | 38 ++--- .../general/auth/ProfileViewModel.kt | 4 +- .../openevent/general/auth/SignUpFragment.kt | 36 ++--- .../openevent/general/auth/SignUpViewModel.kt | 2 +- .../general/common/SingleLiveEvent.kt | 4 +- .../connectivity/MutableConnectionLiveData.kt | 2 +- .../fossasia/openevent/general/di/Modules.kt | 50 +++---- .../general/event/EventDetailsFragment.kt | 42 +++--- .../general/event/EventDetailsViewModel.kt | 5 +- .../openevent/general/event/EventService.kt | 2 +- .../openevent/general/event/EventUtils.kt | 10 +- .../openevent/general/event/EventsFragment.kt | 28 ++-- .../general/event/faq/EventFAQViewModel.kt | 2 +- .../similarevent/SimilarEventViewHolder.kt | 4 +- .../general/favorite/FavoriteEventApi.kt | 6 +- .../favorite/FavoriteEventViewHolder.kt | 4 +- .../favorite/FavoriteEventsListAdapter.kt | 2 +- .../favorite/FavoriteEventsViewModel.kt | 2 +- .../general/favorite/FavoriteFragment.kt | 26 ++-- .../general/feedback/FeedbackFragment.kt | 2 +- .../notification/NotificationFragment.kt | 12 +- .../general/order/ExpiredOrderFragment.kt | 10 +- .../general/order/OrderCompletedFragment.kt | 24 ++-- .../general/order/OrderCompletedViewModel.kt | 2 +- .../general/order/OrderDataSource.kt | 4 +- .../general/order/OrderDetailsFragment.kt | 16 +-- .../order/OrderDetailsRecyclerAdapter.kt | 4 +- .../general/order/OrderDetailsViewHolder.kt | 10 +- .../general/order/OrderDetailsViewModel.kt | 2 +- .../openevent/general/order/OrderService.kt | 4 +- .../general/order/OrdersPagedListAdapter.kt | 2 +- .../general/order/OrdersUnderUserFragment.kt | 22 +-- .../general/order/OrdersViewHolder.kt | 2 +- .../general/search/SearchFilterFragment.kt | 10 +- .../general/search/SearchFragment.kt | 30 ++-- .../general/search/SearchPagedListAdapter.kt | 5 +- .../general/search/SearchResultsFragment.kt | 30 ++-- .../general/search/SearchResultsViewModel.kt | 2 +- .../general/search/SearchViewModel.kt | 2 +- .../search/location/SearchLocationFragment.kt | 18 +-- .../location/SearchLocationViewModel.kt | 12 +- .../recentsearch/RecentSearchViewHolder.kt | 2 +- .../general/search/time/SearchTimeFragment.kt | 8 +- .../general/search/type/SearchTypeFragment.kt | 2 +- .../search/type/SearchTypeViewModel.kt | 2 +- .../openevent/general/sessions/SessionApi.kt | 6 +- .../general/sessions/SessionFragment.kt | 32 ++--- .../general/sessions/SessionViewHolder.kt | 2 +- .../general/sessions/SessionViewModel.kt | 2 +- .../general/sessions/track/TrackConverter.kt | 2 +- .../general/settings/SettingsFragment.kt | 24 ++-- .../general/settings/SettingsViewModel.kt | 2 +- .../social/SocialLinksRecyclerAdapter.kt | 4 +- .../speakercall/EditSpeakerFragment.kt | 58 ++++---- .../speakercall/EditSpeakerViewModel.kt | 2 +- .../speakercall/SpeakersCallFragment.kt | 12 +- .../SpeakersCallProposalFragment.kt | 44 +++--- .../openevent/general/speakers/SpeakerApi.kt | 6 +- .../general/speakers/SpeakerFragment.kt | 2 +- .../general/speakers/SpeakerViewModel.kt | 3 +- .../general/sponsor/SponsorsDetailAdapter.kt | 4 +- .../general/sponsor/SponsorsFragment.kt | 2 +- .../general/sponsor/SponsorsViewModel.kt | 2 +- .../ticket/TicketDetailsRecyclerAdapter.kt | 2 +- .../general/ticket/TicketDetailsViewHolder.kt | 4 +- .../openevent/general/ticket/TicketService.kt | 2 +- .../general/ticket/TicketViewHolder.kt | 26 ++-- .../general/ticket/TicketsFragment.kt | 32 ++--- .../general/ticket/TicketsRecyclerAdapter.kt | 2 +- .../general/ticket/TicketsViewModel.kt | 2 +- .../openevent/general/utils/DateTimeUtils.kt | 2 +- .../openevent/general/utils/ErrorUtils.kt | 4 +- .../openevent/general/utils/StringUtils.kt | 6 +- .../fossasia/openevent/general/utils/Utils.kt | 2 +- .../general/utils/extensions/FragmentExt.kt | 2 +- .../general/welcome/WelcomeFragment.kt | 2 +- .../search/location/LocationServiceImpl.kt | 6 +- .../openevent/general/AppLinkUtilsTest.kt | 6 +- .../openevent/general/event/EventUtilsTest.kt | 4 +- 97 files changed, 576 insertions(+), 579 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6d14d515fc..9575542f86 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.diffplug.gradle.spotless" version "3.24.3" + id "com.diffplug.gradle.spotless" version "3.25.0" } apply plugin: 'com.android.application' diff --git a/app/src/fdroid/java/org/fossasia/openevent/general/search/location/GeoLocationViewModel.kt b/app/src/fdroid/java/org/fossasia/openevent/general/search/location/GeoLocationViewModel.kt index b9e057b0f5..b44c94cb21 100644 --- a/app/src/fdroid/java/org/fossasia/openevent/general/search/location/GeoLocationViewModel.kt +++ b/app/src/fdroid/java/org/fossasia/openevent/general/search/location/GeoLocationViewModel.kt @@ -4,8 +4,8 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.common.SingleLiveEvent import java.lang.IllegalArgumentException +import org.fossasia.openevent.general.common.SingleLiveEvent class GeoLocationViewModel(private val locationService: LocationService) : ViewModel() { private val mutableLocation = SingleLiveEvent() diff --git a/app/src/fdroid/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt b/app/src/fdroid/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt index 1f9f6f8252..e569f3dc91 100644 --- a/app/src/fdroid/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt +++ b/app/src/fdroid/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt @@ -8,11 +8,11 @@ import android.location.LocationListener import android.location.LocationManager import android.os.Bundle import io.reactivex.Single +import java.lang.IllegalArgumentException +import java.util.Locale import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.utils.nullToEmpty -import java.lang.IllegalArgumentException -import java.util.Locale class LocationServiceImpl( private val context: Context, diff --git a/app/src/main/java/org/fossasia/openevent/general/MainActivity.kt b/app/src/main/java/org/fossasia/openevent/general/MainActivity.kt index db677eaad0..d30f90dee1 100644 --- a/app/src/main/java/org/fossasia/openevent/general/MainActivity.kt +++ b/app/src/main/java/org/fossasia/openevent/general/MainActivity.kt @@ -7,12 +7,12 @@ import androidx.appcompat.app.AppCompatActivity import androidx.navigation.NavController import androidx.navigation.fragment.NavHostFragment import androidx.navigation.ui.NavigationUI.setupWithNavController -import kotlinx.android.synthetic.main.activity_main.navigation import kotlinx.android.synthetic.main.activity_main.mainFragmentCoordinatorLayout +import kotlinx.android.synthetic.main.activity_main.navigation +import org.fossasia.openevent.general.auth.AuthFragment import org.fossasia.openevent.general.auth.RC_CREDENTIALS_READ -import org.fossasia.openevent.general.auth.SmartAuthViewModel import org.fossasia.openevent.general.auth.SmartAuthUtil -import org.fossasia.openevent.general.auth.AuthFragment +import org.fossasia.openevent.general.auth.SmartAuthViewModel import org.fossasia.openevent.general.utils.AppLinkUtils import org.fossasia.openevent.general.utils.Utils.navAnimGone import org.fossasia.openevent.general.utils.Utils.navAnimVisible diff --git a/app/src/main/java/org/fossasia/openevent/general/OpenEventDatabase.kt b/app/src/main/java/org/fossasia/openevent/general/OpenEventDatabase.kt index 7a67134112..a21649cc58 100644 --- a/app/src/main/java/org/fossasia/openevent/general/OpenEventDatabase.kt +++ b/app/src/main/java/org/fossasia/openevent/general/OpenEventDatabase.kt @@ -4,8 +4,8 @@ import androidx.room.Database import androidx.room.RoomDatabase import androidx.room.TypeConverters import org.fossasia.openevent.general.attendees.Attendee -import org.fossasia.openevent.general.attendees.AttendeeDao import org.fossasia.openevent.general.attendees.AttendeeConverter +import org.fossasia.openevent.general.attendees.AttendeeDao import org.fossasia.openevent.general.attendees.ListAttendeeConverter import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.auth.User @@ -36,15 +36,15 @@ import org.fossasia.openevent.general.settings.Settings import org.fossasia.openevent.general.settings.SettingsDao import org.fossasia.openevent.general.social.SocialLink import org.fossasia.openevent.general.social.SocialLinksDao -import org.fossasia.openevent.general.speakercall.SpeakersCallConverter -import org.fossasia.openevent.general.speakercall.SpeakersCall import org.fossasia.openevent.general.speakercall.Proposal +import org.fossasia.openevent.general.speakercall.SpeakersCall +import org.fossasia.openevent.general.speakercall.SpeakersCallConverter import org.fossasia.openevent.general.speakercall.SpeakersCallDao +import org.fossasia.openevent.general.speakers.ListSpeakerIdConverter import org.fossasia.openevent.general.speakers.Speaker import org.fossasia.openevent.general.speakers.SpeakerDao import org.fossasia.openevent.general.speakers.SpeakerWithEvent import org.fossasia.openevent.general.speakers.SpeakerWithEventDao -import org.fossasia.openevent.general.speakers.ListSpeakerIdConverter import org.fossasia.openevent.general.sponsor.Sponsor import org.fossasia.openevent.general.sponsor.SponsorDao import org.fossasia.openevent.general.sponsor.SponsorWithEvent diff --git a/app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt b/app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt index 7f2d6b6d93..53205f4df5 100644 --- a/app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/about/AboutEventFragment.kt @@ -12,21 +12,21 @@ import androidx.lifecycle.Observer import androidx.navigation.fragment.navArgs import com.google.android.material.appbar.AppBarLayout import com.squareup.picasso.Picasso -import kotlinx.android.synthetic.main.fragment_about_event.view.appBar -import kotlinx.android.synthetic.main.fragment_about_event.view.progressBarAbout import kotlinx.android.synthetic.main.fragment_about_event.view.aboutEventContent import kotlinx.android.synthetic.main.fragment_about_event.view.aboutEventDetails -import kotlinx.android.synthetic.main.fragment_about_event.view.eventName -import kotlinx.android.synthetic.main.fragment_about_event.view.detailsHeader import kotlinx.android.synthetic.main.fragment_about_event.view.aboutEventImage +import kotlinx.android.synthetic.main.fragment_about_event.view.appBar +import kotlinx.android.synthetic.main.fragment_about_event.view.detailsHeader +import kotlinx.android.synthetic.main.fragment_about_event.view.eventName +import kotlinx.android.synthetic.main.fragment_about_event.view.progressBarAbout import org.fossasia.openevent.general.R import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.stripHtml -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.utils.Utils.setToolbar import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel class AboutEventFragment : Fragment() { private lateinit var rootView: View diff --git a/app/src/main/java/org/fossasia/openevent/general/about/AboutEventViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/about/AboutEventViewModel.kt index 15263baf1d..0414b818b7 100644 --- a/app/src/main/java/org/fossasia/openevent/general/about/AboutEventViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/about/AboutEventViewModel.kt @@ -5,12 +5,12 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventService +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class AboutEventViewModel(private val eventService: EventService, private val resource: Resource) : ViewModel() { diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt index b0ba3f139b..579fbef6e0 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt @@ -1,6 +1,5 @@ package org.fossasia.openevent.general.attendees -import androidx.appcompat.app.AlertDialog import android.app.Activity import android.content.Context import android.content.Intent @@ -11,104 +10,109 @@ import android.text.Editable import android.text.Spannable import android.text.SpannableStringBuilder import android.text.TextPaint +import android.text.TextWatcher import android.text.method.LinkMovementMethod import android.text.style.ClickableSpan -import android.text.TextWatcher import android.view.LayoutInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup import android.widget.AdapterView import android.widget.ArrayAdapter +import androidx.appcompat.app.AlertDialog import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.recyclerview.widget.LinearLayoutManager import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs -import com.stripe.android.Stripe -import com.stripe.android.model.Card -import com.stripe.android.model.Token -import com.paypal.android.sdk.payments.PayPalService +import androidx.recyclerview.widget.LinearLayoutManager import com.paypal.android.sdk.payments.PayPalConfiguration import com.paypal.android.sdk.payments.PayPalPayment -import com.paypal.android.sdk.payments.ShippingAddress +import com.paypal.android.sdk.payments.PayPalService import com.paypal.android.sdk.payments.PaymentActivity import com.paypal.android.sdk.payments.PaymentConfirmation +import com.paypal.android.sdk.payments.ShippingAddress import com.stripe.android.ApiResultCallback +import com.stripe.android.Stripe +import com.stripe.android.model.Card +import com.stripe.android.model.Token import java.math.BigDecimal +import java.util.Calendar +import java.util.Currency +import kotlin.collections.ArrayList +import kotlinx.android.synthetic.main.fragment_attendee.view.accept +import kotlinx.android.synthetic.main.fragment_attendee.view.acceptCheckbox +import kotlinx.android.synthetic.main.fragment_attendee.view.amount +import kotlinx.android.synthetic.main.fragment_attendee.view.attendeeRecycler +import kotlinx.android.synthetic.main.fragment_attendee.view.attendeeScrollView +import kotlinx.android.synthetic.main.fragment_attendee.view.bankRadioButton +import kotlinx.android.synthetic.main.fragment_attendee.view.billingAddress +import kotlinx.android.synthetic.main.fragment_attendee.view.billingAddressLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.billingCity +import kotlinx.android.synthetic.main.fragment_attendee.view.billingCityLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.billingCompany +import kotlinx.android.synthetic.main.fragment_attendee.view.billingCompanyLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.billingEnabledCheckbox +import kotlinx.android.synthetic.main.fragment_attendee.view.billingInfoCheckboxSection +import kotlinx.android.synthetic.main.fragment_attendee.view.billingInfoContainer +import kotlinx.android.synthetic.main.fragment_attendee.view.billingPostalCode +import kotlinx.android.synthetic.main.fragment_attendee.view.billingPostalCodeLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.billingState +import kotlinx.android.synthetic.main.fragment_attendee.view.cancelButton +import kotlinx.android.synthetic.main.fragment_attendee.view.cardNumber +import kotlinx.android.synthetic.main.fragment_attendee.view.cardNumberLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.chequeRadioButton +import kotlinx.android.synthetic.main.fragment_attendee.view.countryPicker import kotlinx.android.synthetic.main.fragment_attendee.view.cvc +import kotlinx.android.synthetic.main.fragment_attendee.view.cvcLayout import kotlinx.android.synthetic.main.fragment_attendee.view.email +import kotlinx.android.synthetic.main.fragment_attendee.view.emailLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.eventName import kotlinx.android.synthetic.main.fragment_attendee.view.firstName +import kotlinx.android.synthetic.main.fragment_attendee.view.firstNameLayout import kotlinx.android.synthetic.main.fragment_attendee.view.helloUser import kotlinx.android.synthetic.main.fragment_attendee.view.lastName -import kotlinx.android.synthetic.main.fragment_attendee.view.billingPostalCode -import kotlinx.android.synthetic.main.fragment_attendee.view.billingInfoCheckboxSection -import kotlinx.android.synthetic.main.fragment_attendee.view.billingEnabledCheckbox -import kotlinx.android.synthetic.main.fragment_attendee.view.attendeeScrollView -import kotlinx.android.synthetic.main.fragment_attendee.view.accept -import kotlinx.android.synthetic.main.fragment_attendee.view.amount -import kotlinx.android.synthetic.main.fragment_attendee.view.attendeeRecycler -import kotlinx.android.synthetic.main.fragment_attendee.view.eventName -import kotlinx.android.synthetic.main.fragment_attendee.view.offlinePayment -import kotlinx.android.synthetic.main.fragment_attendee.view.offlinePaymentDescription +import kotlinx.android.synthetic.main.fragment_attendee.view.lastNameLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.loginButton import kotlinx.android.synthetic.main.fragment_attendee.view.month import kotlinx.android.synthetic.main.fragment_attendee.view.monthText -import kotlinx.android.synthetic.main.fragment_attendee.view.paymentOptionsGroup -import kotlinx.android.synthetic.main.fragment_attendee.view.paypalRadioButton -import kotlinx.android.synthetic.main.fragment_attendee.view.stripeRadioButton +import kotlinx.android.synthetic.main.fragment_attendee.view.offlinePayment +import kotlinx.android.synthetic.main.fragment_attendee.view.offlinePaymentDescription import kotlinx.android.synthetic.main.fragment_attendee.view.onSiteRadioButton -import kotlinx.android.synthetic.main.fragment_attendee.view.chequeRadioButton -import kotlinx.android.synthetic.main.fragment_attendee.view.bankRadioButton +import kotlinx.android.synthetic.main.fragment_attendee.view.paymentOptionsGroup import kotlinx.android.synthetic.main.fragment_attendee.view.paymentSelectorContainer +import kotlinx.android.synthetic.main.fragment_attendee.view.paypalRadioButton import kotlinx.android.synthetic.main.fragment_attendee.view.qty import kotlinx.android.synthetic.main.fragment_attendee.view.register -import kotlinx.android.synthetic.main.fragment_attendee.view.signOut -import kotlinx.android.synthetic.main.fragment_attendee.view.stripePayment -import kotlinx.android.synthetic.main.fragment_attendee.view.ticketDetails -import kotlinx.android.synthetic.main.fragment_attendee.view.ticketsRecycler -import kotlinx.android.synthetic.main.fragment_attendee.view.time -import kotlinx.android.synthetic.main.fragment_attendee.view.ticketTableDetails -import kotlinx.android.synthetic.main.fragment_attendee.view.year -import kotlinx.android.synthetic.main.fragment_attendee.view.yearText -import kotlinx.android.synthetic.main.fragment_attendee.view.cardNumber -import kotlinx.android.synthetic.main.fragment_attendee.view.acceptCheckbox -import kotlinx.android.synthetic.main.fragment_attendee.view.countryPicker -import kotlinx.android.synthetic.main.fragment_attendee.view.billingInfoContainer -import kotlinx.android.synthetic.main.fragment_attendee.view.billingCity -import kotlinx.android.synthetic.main.fragment_attendee.view.billingCompany -import kotlinx.android.synthetic.main.fragment_attendee.view.billingState -import kotlinx.android.synthetic.main.fragment_attendee.view.taxId -import kotlinx.android.synthetic.main.fragment_attendee.view.billingAddress -import kotlinx.android.synthetic.main.fragment_attendee.view.firstNameLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.lastNameLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.emailLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.billingCompanyLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.billingAddressLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.cvcLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.billingCityLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.billingPostalCodeLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.cardNumberLayout import kotlinx.android.synthetic.main.fragment_attendee.view.sameBuyerCheckBox -import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutTextView -import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutCounterLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutInfoTextView -import kotlinx.android.synthetic.main.fragment_attendee.view.signInPasswordLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.signInPassword -import kotlinx.android.synthetic.main.fragment_attendee.view.loginButton -import kotlinx.android.synthetic.main.fragment_attendee.view.cancelButton -import kotlinx.android.synthetic.main.fragment_attendee.view.signInEmailLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.signInEmail import kotlinx.android.synthetic.main.fragment_attendee.view.signInEditLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.signInEmail +import kotlinx.android.synthetic.main.fragment_attendee.view.signInEmailLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.signInLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.signInPassword +import kotlinx.android.synthetic.main.fragment_attendee.view.signInPasswordLayout import kotlinx.android.synthetic.main.fragment_attendee.view.signInText import kotlinx.android.synthetic.main.fragment_attendee.view.signInTextLayout -import kotlinx.android.synthetic.main.fragment_attendee.view.signInLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.signOut import kotlinx.android.synthetic.main.fragment_attendee.view.signOutLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.stripePayment +import kotlinx.android.synthetic.main.fragment_attendee.view.stripeRadioButton +import kotlinx.android.synthetic.main.fragment_attendee.view.taxId import kotlinx.android.synthetic.main.fragment_attendee.view.taxLayout import kotlinx.android.synthetic.main.fragment_attendee.view.taxPrice +import kotlinx.android.synthetic.main.fragment_attendee.view.ticketDetails +import kotlinx.android.synthetic.main.fragment_attendee.view.ticketTableDetails +import kotlinx.android.synthetic.main.fragment_attendee.view.ticketsRecycler +import kotlinx.android.synthetic.main.fragment_attendee.view.time +import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutCounterLayout +import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutInfoTextView +import kotlinx.android.synthetic.main.fragment_attendee.view.timeoutTextView import kotlinx.android.synthetic.main.fragment_attendee.view.totalAmountLayout import kotlinx.android.synthetic.main.fragment_attendee.view.totalPrice +import kotlinx.android.synthetic.main.fragment_attendee.view.year +import kotlinx.android.synthetic.main.fragment_attendee.view.yearText import org.fossasia.openevent.general.BuildConfig +import org.fossasia.openevent.general.ComplexBackPressFragment import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.User import org.fossasia.openevent.general.event.Event @@ -117,23 +121,19 @@ import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.order.Charge import org.fossasia.openevent.general.ticket.TicketDetailsRecyclerAdapter import org.fossasia.openevent.general.ticket.TicketId +import org.fossasia.openevent.general.utils.StringUtils.getTermsAndPolicyText import org.fossasia.openevent.general.utils.Utils import org.fossasia.openevent.general.utils.Utils.isNetworkConnected -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.fossasia.openevent.general.utils.nullToEmpty -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.ComplexBackPressFragment -import org.fossasia.openevent.general.utils.StringUtils.getTermsAndPolicyText import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.show -import org.fossasia.openevent.general.utils.setRequired import org.fossasia.openevent.general.utils.checkEmpty import org.fossasia.openevent.general.utils.checkValidEmail +import org.fossasia.openevent.general.utils.extensions.nonNull +import org.fossasia.openevent.general.utils.nullToEmpty +import org.fossasia.openevent.general.utils.setRequired import org.jetbrains.anko.design.longSnackbar import org.jetbrains.anko.design.snackbar -import java.util.Calendar -import java.util.Currency -import kotlin.collections.ArrayList +import org.koin.androidx.viewmodel.ext.android.viewModel private const val PAYPAL_REQUEST_CODE = 101 diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeRecyclerAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeRecyclerAdapter.kt index 98c990cfa9..a890927840 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeRecyclerAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeRecyclerAdapter.kt @@ -1,10 +1,10 @@ package org.fossasia.openevent.general.attendees -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup -import org.fossasia.openevent.general.databinding.ItemAttendeeBinding +import androidx.recyclerview.widget.RecyclerView import org.fossasia.openevent.general.attendees.forms.CustomForm +import org.fossasia.openevent.general.databinding.ItemAttendeeBinding import org.fossasia.openevent.general.ticket.Ticket class AttendeeRecyclerAdapter : RecyclerView.Adapter() { diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewHolder.kt index 606623619c..33a4be15ac 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewHolder.kt @@ -1,6 +1,5 @@ package org.fossasia.openevent.general.attendees -import androidx.recyclerview.widget.RecyclerView import android.text.Editable import android.text.SpannableStringBuilder import android.text.TextWatcher @@ -8,53 +7,54 @@ import android.view.View import android.widget.AdapterView import android.widget.ArrayAdapter import androidx.core.view.isVisible +import androidx.recyclerview.widget.RecyclerView import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputLayout -import kotlinx.android.synthetic.main.item_attendee.view.firstNameLayout -import kotlinx.android.synthetic.main.item_attendee.view.firstName -import kotlinx.android.synthetic.main.item_attendee.view.lastNameLayout -import kotlinx.android.synthetic.main.item_attendee.view.lastName -import kotlinx.android.synthetic.main.item_attendee.view.emailLayout -import kotlinx.android.synthetic.main.item_attendee.view.email -import kotlinx.android.synthetic.main.item_attendee.view.attendeeBillingAddressLayout -import kotlinx.android.synthetic.main.item_attendee.view.attendeeBillingAddress -import kotlinx.android.synthetic.main.item_attendee.view.phoneLayout -import kotlinx.android.synthetic.main.item_attendee.view.phone -import kotlinx.android.synthetic.main.item_attendee.view.workPhoneLayout -import kotlinx.android.synthetic.main.item_attendee.view.workPhone -import kotlinx.android.synthetic.main.item_attendee.view.addressLayout import kotlinx.android.synthetic.main.item_attendee.view.address -import kotlinx.android.synthetic.main.item_attendee.view.workAddressLayout -import kotlinx.android.synthetic.main.item_attendee.view.workAddress -import kotlinx.android.synthetic.main.item_attendee.view.blogLayout +import kotlinx.android.synthetic.main.item_attendee.view.addressLayout +import kotlinx.android.synthetic.main.item_attendee.view.attendeeBillingAddress +import kotlinx.android.synthetic.main.item_attendee.view.attendeeBillingAddressLayout import kotlinx.android.synthetic.main.item_attendee.view.blog -import kotlinx.android.synthetic.main.item_attendee.view.websiteLayout -import kotlinx.android.synthetic.main.item_attendee.view.website -import kotlinx.android.synthetic.main.item_attendee.view.twitterLayout -import kotlinx.android.synthetic.main.item_attendee.view.twitter -import kotlinx.android.synthetic.main.item_attendee.view.facebookLayout -import kotlinx.android.synthetic.main.item_attendee.view.facebook -import kotlinx.android.synthetic.main.item_attendee.view.githubLayout -import kotlinx.android.synthetic.main.item_attendee.view.github -import kotlinx.android.synthetic.main.item_attendee.view.shippingAddressLayout -import kotlinx.android.synthetic.main.item_attendee.view.shippingAddress -import kotlinx.android.synthetic.main.item_attendee.view.taxBusinessInfoLayout -import kotlinx.android.synthetic.main.item_attendee.view.taxBusinessInfo -import kotlinx.android.synthetic.main.item_attendee.view.stateLayout -import kotlinx.android.synthetic.main.item_attendee.view.state -import kotlinx.android.synthetic.main.item_attendee.view.homeAddressLayout -import kotlinx.android.synthetic.main.item_attendee.view.homeAddress -import kotlinx.android.synthetic.main.item_attendee.view.cityLayout +import kotlinx.android.synthetic.main.item_attendee.view.blogLayout import kotlinx.android.synthetic.main.item_attendee.view.city -import kotlinx.android.synthetic.main.item_attendee.view.genderLayout -import kotlinx.android.synthetic.main.item_attendee.view.genderText -import kotlinx.android.synthetic.main.item_attendee.view.genderSpinner +import kotlinx.android.synthetic.main.item_attendee.view.cityLayout import kotlinx.android.synthetic.main.item_attendee.view.company import kotlinx.android.synthetic.main.item_attendee.view.companyLayout -import kotlinx.android.synthetic.main.item_attendee.view.countryLayout import kotlinx.android.synthetic.main.item_attendee.view.country -import kotlinx.android.synthetic.main.item_attendee.view.jobTitleLayout +import kotlinx.android.synthetic.main.item_attendee.view.countryLayout +import kotlinx.android.synthetic.main.item_attendee.view.email +import kotlinx.android.synthetic.main.item_attendee.view.emailLayout +import kotlinx.android.synthetic.main.item_attendee.view.facebook +import kotlinx.android.synthetic.main.item_attendee.view.facebookLayout +import kotlinx.android.synthetic.main.item_attendee.view.firstName +import kotlinx.android.synthetic.main.item_attendee.view.firstNameLayout +import kotlinx.android.synthetic.main.item_attendee.view.genderLayout +import kotlinx.android.synthetic.main.item_attendee.view.genderSpinner +import kotlinx.android.synthetic.main.item_attendee.view.genderText +import kotlinx.android.synthetic.main.item_attendee.view.github +import kotlinx.android.synthetic.main.item_attendee.view.githubLayout +import kotlinx.android.synthetic.main.item_attendee.view.homeAddress +import kotlinx.android.synthetic.main.item_attendee.view.homeAddressLayout import kotlinx.android.synthetic.main.item_attendee.view.jobTitle +import kotlinx.android.synthetic.main.item_attendee.view.jobTitleLayout +import kotlinx.android.synthetic.main.item_attendee.view.lastName +import kotlinx.android.synthetic.main.item_attendee.view.lastNameLayout +import kotlinx.android.synthetic.main.item_attendee.view.phone +import kotlinx.android.synthetic.main.item_attendee.view.phoneLayout +import kotlinx.android.synthetic.main.item_attendee.view.shippingAddress +import kotlinx.android.synthetic.main.item_attendee.view.shippingAddressLayout +import kotlinx.android.synthetic.main.item_attendee.view.state +import kotlinx.android.synthetic.main.item_attendee.view.stateLayout +import kotlinx.android.synthetic.main.item_attendee.view.taxBusinessInfo +import kotlinx.android.synthetic.main.item_attendee.view.taxBusinessInfoLayout +import kotlinx.android.synthetic.main.item_attendee.view.twitter +import kotlinx.android.synthetic.main.item_attendee.view.twitterLayout +import kotlinx.android.synthetic.main.item_attendee.view.website +import kotlinx.android.synthetic.main.item_attendee.view.websiteLayout +import kotlinx.android.synthetic.main.item_attendee.view.workAddress +import kotlinx.android.synthetic.main.item_attendee.view.workAddressLayout +import kotlinx.android.synthetic.main.item_attendee.view.workPhone +import kotlinx.android.synthetic.main.item_attendee.view.workPhoneLayout import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.attendees.forms.FormIdentifier @@ -67,8 +67,8 @@ import org.fossasia.openevent.general.utils.checkEmpty import org.fossasia.openevent.general.utils.checkValidEmail import org.fossasia.openevent.general.utils.checkValidURI import org.fossasia.openevent.general.utils.emptyToNull -import org.fossasia.openevent.general.utils.setRequired import org.fossasia.openevent.general.utils.nullToEmpty +import org.fossasia.openevent.general.utils.setRequired class AttendeeViewHolder(private val binding: ItemAttendeeBinding) : RecyclerView.ViewHolder(binding.root) { private val resource = Resource() diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewModel.kt index b4ea404a16..69ac5db914 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeViewModel.kt @@ -5,9 +5,8 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable -import org.fossasia.openevent.general.R import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.auth.AuthService @@ -26,6 +25,7 @@ import org.fossasia.openevent.general.ticket.Ticket import org.fossasia.openevent.general.ticket.TicketService import org.fossasia.openevent.general.utils.ErrorUtils import org.fossasia.openevent.general.utils.HttpErrors +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import retrofit2.HttpException import timber.log.Timber diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/AuthApi.kt b/app/src/main/java/org/fossasia/openevent/general/auth/AuthApi.kt index beea5821d4..ee5b713bf4 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/AuthApi.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/AuthApi.kt @@ -8,11 +8,11 @@ import org.fossasia.openevent.general.auth.forgot.Email import org.fossasia.openevent.general.auth.forgot.RequestToken import org.fossasia.openevent.general.auth.forgot.RequestTokenResponse import retrofit2.http.Body +import retrofit2.http.DELETE import retrofit2.http.GET import retrofit2.http.PATCH import retrofit2.http.POST import retrofit2.http.Path -import retrofit2.http.DELETE interface AuthApi { diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt index 112cffead2..47aaa3ab27 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt @@ -4,22 +4,22 @@ import android.os.Bundle import android.text.Editable import android.text.TextWatcher import android.util.Patterns -import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.core.view.isVisible +import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.navArgs -import kotlinx.android.synthetic.main.fragment_auth.view.getStartedButton import kotlinx.android.synthetic.main.fragment_auth.view.email import kotlinx.android.synthetic.main.fragment_auth.view.emailLayout +import kotlinx.android.synthetic.main.fragment_auth.view.getStartedButton import kotlinx.android.synthetic.main.fragment_auth.view.rootLayout +import kotlinx.android.synthetic.main.fragment_auth.view.setting import kotlinx.android.synthetic.main.fragment_auth.view.skipTextView import kotlinx.android.synthetic.main.fragment_auth.view.toolbar -import kotlinx.android.synthetic.main.fragment_auth.view.setting import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.ComplexBackPressFragment import org.fossasia.openevent.general.PLAY_STORE_BUILD_FLAVOR @@ -31,9 +31,9 @@ import org.fossasia.openevent.general.search.location.SEARCH_LOCATION_FRAGMENT import org.fossasia.openevent.general.speakercall.SPEAKERS_CALL_FRAGMENT import org.fossasia.openevent.general.ticket.TICKETS_FRAGMENT import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard -import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setSharedElementEnterTransition import org.fossasia.openevent.general.welcome.WELCOME_FRAGMENT diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/AuthViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/auth/AuthViewModel.kt index c1ba3924a6..a0b5661190 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/AuthViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/AuthViewModel.kt @@ -3,9 +3,9 @@ package org.fossasia.openevent.general.auth import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel -import org.fossasia.openevent.general.R import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Network import org.fossasia.openevent.general.data.Resource diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileFragment.kt index 42a671e760..18c9dfb8a9 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileFragment.kt @@ -2,11 +2,9 @@ package org.fossasia.openevent.general.auth import android.Manifest import android.app.Activity -import androidx.appcompat.app.AlertDialog import android.content.Intent import android.content.pm.PackageManager import android.graphics.Bitmap -import org.fossasia.openevent.general.utils.ImageUtils.decodeBitmap import android.os.Bundle import android.provider.MediaStore import android.util.Base64 @@ -14,6 +12,7 @@ import android.util.Patterns import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.core.graphics.drawable.toBitmap @@ -22,44 +21,45 @@ import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs import com.google.android.material.textfield.TextInputEditText +import com.squareup.picasso.MemoryPolicy import com.squareup.picasso.Picasso -import kotlinx.android.synthetic.main.fragment_edit_profile.view.updateButton -import kotlinx.android.synthetic.main.fragment_edit_profile.view.toolbar -import kotlinx.android.synthetic.main.fragment_edit_profile.view.firstName +import java.io.ByteArrayOutputStream +import java.io.File +import java.io.FileNotFoundException +import java.io.FileOutputStream +import java.io.IOException +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.editImage +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.removeImage +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.replaceImage +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.takeImage import kotlinx.android.synthetic.main.fragment_edit_profile.view.details import kotlinx.android.synthetic.main.fragment_edit_profile.view.facebook -import kotlinx.android.synthetic.main.fragment_edit_profile.view.twitter +import kotlinx.android.synthetic.main.fragment_edit_profile.view.firstName import kotlinx.android.synthetic.main.fragment_edit_profile.view.instagram -import kotlinx.android.synthetic.main.fragment_edit_profile.view.phone -import com.squareup.picasso.MemoryPolicy -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.editImage -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.takeImage -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.replaceImage -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.removeImage import kotlinx.android.synthetic.main.fragment_edit_profile.view.lastName +import kotlinx.android.synthetic.main.fragment_edit_profile.view.phone import kotlinx.android.synthetic.main.fragment_edit_profile.view.profilePhoto import kotlinx.android.synthetic.main.fragment_edit_profile.view.profilePhotoFab +import kotlinx.android.synthetic.main.fragment_edit_profile.view.toolbar +import kotlinx.android.synthetic.main.fragment_edit_profile.view.twitter +import kotlinx.android.synthetic.main.fragment_edit_profile.view.updateButton import org.fossasia.openevent.general.CircleTransform +import org.fossasia.openevent.general.ComplexBackPressFragment import org.fossasia.openevent.general.MainActivity import org.fossasia.openevent.general.R import org.fossasia.openevent.general.RotateBitmap -import org.fossasia.openevent.general.ComplexBackPressFragment -import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.ImageUtils.decodeBitmap import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.requireDrawable +import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.emptyToNull import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.nullToEmpty +import org.jetbrains.anko.design.snackbar import org.koin.androidx.viewmodel.ext.android.viewModel import timber.log.Timber -import java.io.ByteArrayOutputStream -import java.io.File -import java.io.FileOutputStream -import java.io.IOException -import java.io.FileNotFoundException -import org.fossasia.openevent.general.utils.Utils.setToolbar -import org.fossasia.openevent.general.utils.emptyToNull -import org.jetbrains.anko.design.snackbar class EditProfileFragment : Fragment(), ComplexBackPressFragment { diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileViewModel.kt index c1ca351d2b..afd0c4d012 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/EditProfileViewModel.kt @@ -6,12 +6,12 @@ import androidx.lifecycle.ViewModel import io.reactivex.Single import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers +import java.io.File import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber -import java.io.File class EditProfileViewModel( private val authService: AuthService, diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/LoginFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/LoginFragment.kt index d6397e42d1..460c976ddb 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/LoginFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/LoginFragment.kt @@ -13,14 +13,14 @@ import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs import kotlinx.android.synthetic.main.fragment_login.email -import kotlinx.android.synthetic.main.fragment_login.password import kotlinx.android.synthetic.main.fragment_login.loginButton -import kotlinx.android.synthetic.main.fragment_login.view.password +import kotlinx.android.synthetic.main.fragment_login.password import kotlinx.android.synthetic.main.fragment_login.view.email -import kotlinx.android.synthetic.main.fragment_login.view.loginCoordinatorLayout import kotlinx.android.synthetic.main.fragment_login.view.forgotPassword import kotlinx.android.synthetic.main.fragment_login.view.loginButton +import kotlinx.android.synthetic.main.fragment_login.view.loginCoordinatorLayout import kotlinx.android.synthetic.main.fragment_login.view.loginLayout +import kotlinx.android.synthetic.main.fragment_login.view.password import kotlinx.android.synthetic.main.fragment_login.view.sentEmailLayout import kotlinx.android.synthetic.main.fragment_login.view.tick import kotlinx.android.synthetic.main.fragment_login.view.toolbar @@ -35,11 +35,11 @@ import org.fossasia.openevent.general.search.ORDER_COMPLETED_FRAGMENT import org.fossasia.openevent.general.search.SEARCH_RESULTS_FRAGMENT import org.fossasia.openevent.general.speakercall.SPEAKERS_CALL_FRAGMENT import org.fossasia.openevent.general.ticket.TICKETS_FRAGMENT +import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard +import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.Utils.showNoInternetDialog -import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard -import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setSharedElementEnterTransition import org.jetbrains.anko.design.longSnackbar diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/LoginViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/auth/LoginViewModel.kt index 5241839b43..a123719434 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/LoginViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/LoginViewModel.kt @@ -5,13 +5,13 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.Single import io.reactivex.disposables.CompositeDisposable -import org.fossasia.openevent.general.R import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Network import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.EventService +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class LoginViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/ProfileFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/ProfileFragment.kt index e04fa795c8..057578f2ae 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/ProfileFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/ProfileFragment.kt @@ -1,6 +1,5 @@ package org.fossasia.openevent.general.auth -import androidx.appcompat.app.AlertDialog import android.content.ActivityNotFoundException import android.content.Intent import android.net.Uri @@ -10,55 +9,56 @@ import android.text.TextWatcher import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController import com.squareup.picasso.Picasso -import kotlinx.android.synthetic.main.dialog_change_password.view.oldPassword -import kotlinx.android.synthetic.main.dialog_change_password.view.newPassword import kotlinx.android.synthetic.main.dialog_change_password.view.confirmNewPassword +import kotlinx.android.synthetic.main.dialog_change_password.view.newPassword +import kotlinx.android.synthetic.main.dialog_change_password.view.oldPassword import kotlinx.android.synthetic.main.dialog_change_password.view.textInputLayoutConfirmNewPassword import kotlinx.android.synthetic.main.dialog_change_password.view.textInputLayoutNewPassword import kotlinx.android.synthetic.main.dialog_confirm_delete_account.view.password -import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmEmailButton -import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmEmailLayout +import kotlinx.android.synthetic.main.dialog_delete_account.view.cancelButton import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmDeleteCheckbox import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmDeleteLayout +import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmEmailButton +import kotlinx.android.synthetic.main.dialog_delete_account.view.confirmEmailLayout import kotlinx.android.synthetic.main.dialog_delete_account.view.deleteButton -import kotlinx.android.synthetic.main.dialog_delete_account.view.cancelButton import kotlinx.android.synthetic.main.dialog_delete_account.view.email -import kotlinx.android.synthetic.main.fragment_profile.view.login -import kotlinx.android.synthetic.main.fragment_profile.view.logout -import kotlinx.android.synthetic.main.fragment_profile.view.accountInfoContainer import kotlinx.android.synthetic.main.fragment_profile.view.accountAvatar import kotlinx.android.synthetic.main.fragment_profile.view.accountEmail +import kotlinx.android.synthetic.main.fragment_profile.view.accountInfoContainer import kotlinx.android.synthetic.main.fragment_profile.view.accountName import kotlinx.android.synthetic.main.fragment_profile.view.accountNotVerified import kotlinx.android.synthetic.main.fragment_profile.view.accountVerified -import kotlinx.android.synthetic.main.fragment_profile.view.profileSettingContainer -import kotlinx.android.synthetic.main.fragment_profile.view.profileScrollView +import kotlinx.android.synthetic.main.fragment_profile.view.changePassword +import kotlinx.android.synthetic.main.fragment_profile.view.deleteAccount import kotlinx.android.synthetic.main.fragment_profile.view.editProfile +import kotlinx.android.synthetic.main.fragment_profile.view.login +import kotlinx.android.synthetic.main.fragment_profile.view.logout import kotlinx.android.synthetic.main.fragment_profile.view.manageEvents +import kotlinx.android.synthetic.main.fragment_profile.view.profileScrollView +import kotlinx.android.synthetic.main.fragment_profile.view.profileSettingContainer import kotlinx.android.synthetic.main.fragment_profile.view.settings import kotlinx.android.synthetic.main.fragment_profile.view.ticketIssues -import kotlinx.android.synthetic.main.fragment_profile.view.changePassword -import kotlinx.android.synthetic.main.fragment_profile.view.deleteAccount +import org.fossasia.openevent.general.BottomIconDoubleClick import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.CircleTransform import org.fossasia.openevent.general.PLAY_STORE_BUILD_FLAVOR import org.fossasia.openevent.general.R -import org.fossasia.openevent.general.BottomIconDoubleClick -import org.fossasia.openevent.general.utils.VERIFICATION_TOKEN import org.fossasia.openevent.general.utils.Utils +import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.requireDrawable -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.fossasia.openevent.general.utils.nullToEmpty -import org.koin.androidx.viewmodel.ext.android.viewModel import org.fossasia.openevent.general.utils.Utils.setToolbar -import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.VERIFICATION_TOKEN +import org.fossasia.openevent.general.utils.extensions.nonNull +import org.fossasia.openevent.general.utils.nullToEmpty import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel const val PROFILE_FRAGMENT = "profileFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/ProfileViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/auth/ProfileViewModel.kt index 5809757cf9..a8db10522f 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/ProfileViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/ProfileViewModel.kt @@ -4,11 +4,11 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable -import org.fossasia.openevent.general.R import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class ProfileViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/SignUpFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/SignUpFragment.kt index 2d438084c1..2a9a55af14 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/SignUpFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/SignUpFragment.kt @@ -2,7 +2,9 @@ package org.fossasia.openevent.general.auth import android.os.Bundle import android.text.Editable +import android.text.SpannableStringBuilder import android.text.TextWatcher +import android.text.method.LinkMovementMethod import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -10,30 +12,20 @@ import android.view.inputmethod.EditorInfo import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController -import kotlinx.android.synthetic.main.fragment_signup.view.textInputLayoutPassword -import kotlinx.android.synthetic.main.fragment_signup.view.textInputLayoutConfirmPassword +import androidx.navigation.fragment.navArgs +import kotlinx.android.synthetic.main.fragment_signup.view.confirmPasswords +import kotlinx.android.synthetic.main.fragment_signup.view.emailSignUp import kotlinx.android.synthetic.main.fragment_signup.view.firstNameText -import kotlinx.android.synthetic.main.fragment_signup.view.signUpButton import kotlinx.android.synthetic.main.fragment_signup.view.lastNameText import kotlinx.android.synthetic.main.fragment_signup.view.passwordSignUp -import kotlinx.android.synthetic.main.fragment_signup.view.confirmPasswords -import kotlinx.android.synthetic.main.fragment_signup.view.emailSignUp -import kotlinx.android.synthetic.main.fragment_signup.view.signupNestedScrollView -import kotlinx.android.synthetic.main.fragment_signup.view.signUpText +import kotlinx.android.synthetic.main.fragment_signup.view.signUpButton import kotlinx.android.synthetic.main.fragment_signup.view.signUpCheckbox +import kotlinx.android.synthetic.main.fragment_signup.view.signUpText +import kotlinx.android.synthetic.main.fragment_signup.view.signupNestedScrollView +import kotlinx.android.synthetic.main.fragment_signup.view.textInputLayoutConfirmPassword +import kotlinx.android.synthetic.main.fragment_signup.view.textInputLayoutPassword import kotlinx.android.synthetic.main.fragment_signup.view.toolbar import org.fossasia.openevent.general.R -import org.fossasia.openevent.general.utils.Utils.setToolbar -import org.fossasia.openevent.general.utils.Utils.show -import org.fossasia.openevent.general.utils.Utils.progressDialog -import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard -import org.fossasia.openevent.general.utils.Utils.showNoInternetDialog -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel -import android.text.SpannableStringBuilder -import android.text.method.LinkMovementMethod -import androidx.navigation.fragment.navArgs -import org.fossasia.openevent.general.utils.StringUtils.getTermsAndPolicyText import org.fossasia.openevent.general.event.EVENT_DETAIL_FRAGMENT import org.fossasia.openevent.general.favorite.FAVORITE_FRAGMENT import org.fossasia.openevent.general.notification.NOTIFICATION_FRAGMENT @@ -42,9 +34,17 @@ import org.fossasia.openevent.general.search.ORDER_COMPLETED_FRAGMENT import org.fossasia.openevent.general.search.SEARCH_RESULTS_FRAGMENT import org.fossasia.openevent.general.speakercall.SPEAKERS_CALL_FRAGMENT import org.fossasia.openevent.general.ticket.TICKETS_FRAGMENT +import org.fossasia.openevent.general.utils.StringUtils.getTermsAndPolicyText +import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard +import org.fossasia.openevent.general.utils.Utils.progressDialog +import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.Utils.showNoInternetDialog +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setSharedElementEnterTransition import org.jetbrains.anko.design.longSnackbar import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel const val MINIMUM_PASSWORD_LENGTH = 8 diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/SignUpViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/auth/SignUpViewModel.kt index 482a42c9d8..575bd14a16 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/SignUpViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/SignUpViewModel.kt @@ -5,11 +5,11 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Network import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.utils.nullToEmpty import timber.log.Timber diff --git a/app/src/main/java/org/fossasia/openevent/general/common/SingleLiveEvent.kt b/app/src/main/java/org/fossasia/openevent/general/common/SingleLiveEvent.kt index 83e2cb6091..cc5667c1b6 100644 --- a/app/src/main/java/org/fossasia/openevent/general/common/SingleLiveEvent.kt +++ b/app/src/main/java/org/fossasia/openevent/general/common/SingleLiveEvent.kt @@ -16,12 +16,12 @@ package org.fossasia.openevent.general.common * limitations under the License. */ +import androidx.annotation.MainThread import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.MutableLiveData import androidx.lifecycle.Observer -import androidx.annotation.MainThread -import timber.log.Timber import java.util.concurrent.atomic.AtomicBoolean +import timber.log.Timber /** * A lifecycle-aware observable that sends only new updates after subscription, used for events like diff --git a/app/src/main/java/org/fossasia/openevent/general/connectivity/MutableConnectionLiveData.kt b/app/src/main/java/org/fossasia/openevent/general/connectivity/MutableConnectionLiveData.kt index acf260c742..099fb44e6d 100644 --- a/app/src/main/java/org/fossasia/openevent/general/connectivity/MutableConnectionLiveData.kt +++ b/app/src/main/java/org/fossasia/openevent/general/connectivity/MutableConnectionLiveData.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.connectivity -import android.content.Intent import android.content.BroadcastReceiver import android.content.Context +import android.content.Intent import android.content.IntentFilter import android.net.ConnectivityManager import androidx.lifecycle.MutableLiveData diff --git a/app/src/main/java/org/fossasia/openevent/general/di/Modules.kt b/app/src/main/java/org/fossasia/openevent/general/di/Modules.kt index 80e70b4097..a174d4940d 100644 --- a/app/src/main/java/org/fossasia/openevent/general/di/Modules.kt +++ b/app/src/main/java/org/fossasia/openevent/general/di/Modules.kt @@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.github.jasminb.jsonapi.ResourceConverter import com.github.jasminb.jsonapi.retrofit.JSONAPIConverterFactory +import java.util.concurrent.TimeUnit import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor import org.fossasia.openevent.general.BuildConfig @@ -22,33 +23,47 @@ import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.auth.AuthApi import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.auth.AuthService +import org.fossasia.openevent.general.auth.AuthViewModel import org.fossasia.openevent.general.auth.EditProfileViewModel import org.fossasia.openevent.general.auth.LoginViewModel import org.fossasia.openevent.general.auth.ProfileViewModel import org.fossasia.openevent.general.auth.RequestAuthenticator import org.fossasia.openevent.general.auth.SignUp import org.fossasia.openevent.general.auth.SignUpViewModel +import org.fossasia.openevent.general.auth.SmartAuthViewModel import org.fossasia.openevent.general.auth.User -import org.fossasia.openevent.general.auth.AuthViewModel +import org.fossasia.openevent.general.connectivity.MutableConnectionLiveData import org.fossasia.openevent.general.data.Network import org.fossasia.openevent.general.data.Preference +import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.discount.DiscountApi +import org.fossasia.openevent.general.discount.DiscountCode import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventApi import org.fossasia.openevent.general.event.EventDetailsViewModel import org.fossasia.openevent.general.event.EventId import org.fossasia.openevent.general.event.EventService -import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.EventsViewModel import org.fossasia.openevent.general.event.faq.EventFAQ import org.fossasia.openevent.general.event.faq.EventFAQApi +import org.fossasia.openevent.general.event.faq.EventFAQViewModel import org.fossasia.openevent.general.event.location.EventLocation import org.fossasia.openevent.general.event.location.EventLocationApi import org.fossasia.openevent.general.event.subtopic.EventSubTopic +import org.fossasia.openevent.general.event.tax.Tax +import org.fossasia.openevent.general.event.tax.TaxApi +import org.fossasia.openevent.general.event.tax.TaxService import org.fossasia.openevent.general.event.topic.EventTopic import org.fossasia.openevent.general.event.topic.EventTopicApi import org.fossasia.openevent.general.event.types.EventType import org.fossasia.openevent.general.event.types.EventTypesApi +import org.fossasia.openevent.general.favorite.FavoriteEvent +import org.fossasia.openevent.general.favorite.FavoriteEventApi import org.fossasia.openevent.general.favorite.FavoriteEventsViewModel +import org.fossasia.openevent.general.feedback.Feedback +import org.fossasia.openevent.general.feedback.FeedbackApi +import org.fossasia.openevent.general.feedback.FeedbackService +import org.fossasia.openevent.general.feedback.FeedbackViewModel import org.fossasia.openevent.general.notification.Notification import org.fossasia.openevent.general.notification.NotificationApi import org.fossasia.openevent.general.notification.NotificationService @@ -63,32 +78,17 @@ import org.fossasia.openevent.general.order.OrderService import org.fossasia.openevent.general.order.OrdersUnderUserViewModel import org.fossasia.openevent.general.paypal.Paypal import org.fossasia.openevent.general.paypal.PaypalApi +import org.fossasia.openevent.general.search.SearchResultsViewModel +import org.fossasia.openevent.general.search.SearchViewModel import org.fossasia.openevent.general.search.location.GeoLocationViewModel +import org.fossasia.openevent.general.search.location.LocationService +import org.fossasia.openevent.general.search.location.LocationServiceImpl import org.fossasia.openevent.general.search.location.SearchLocationViewModel import org.fossasia.openevent.general.search.time.SearchTimeViewModel -import org.fossasia.openevent.general.search.SearchViewModel -import org.fossasia.openevent.general.search.location.LocationService import org.fossasia.openevent.general.search.type.SearchTypeViewModel -import org.fossasia.openevent.general.search.location.LocationServiceImpl -import org.fossasia.openevent.general.auth.SmartAuthViewModel -import org.fossasia.openevent.general.connectivity.MutableConnectionLiveData -import org.fossasia.openevent.general.discount.DiscountApi -import org.fossasia.openevent.general.discount.DiscountCode import org.fossasia.openevent.general.sessions.Session import org.fossasia.openevent.general.sessions.SessionApi import org.fossasia.openevent.general.sessions.SessionService -import org.fossasia.openevent.general.event.faq.EventFAQViewModel -import org.fossasia.openevent.general.event.tax.Tax -import org.fossasia.openevent.general.event.tax.TaxApi -import org.fossasia.openevent.general.event.tax.TaxService -import org.fossasia.openevent.general.favorite.FavoriteEvent -import org.fossasia.openevent.general.favorite.FavoriteEventApi -import org.fossasia.openevent.general.feedback.FeedbackViewModel -import org.fossasia.openevent.general.feedback.Feedback -import org.fossasia.openevent.general.feedback.FeedbackService -import org.fossasia.openevent.general.feedback.FeedbackApi -import org.fossasia.openevent.general.search.SearchResultsViewModel -import org.fossasia.openevent.general.speakercall.SpeakersCall import org.fossasia.openevent.general.sessions.SessionViewModel import org.fossasia.openevent.general.sessions.microlocation.MicroLocation import org.fossasia.openevent.general.sessions.sessiontype.SessionType @@ -100,10 +100,11 @@ import org.fossasia.openevent.general.settings.SettingsViewModel import org.fossasia.openevent.general.social.SocialLink import org.fossasia.openevent.general.social.SocialLinkApi import org.fossasia.openevent.general.social.SocialLinksService -import org.fossasia.openevent.general.speakercall.SpeakersCallViewModel -import org.fossasia.openevent.general.speakercall.SpeakersCallProposalViewModel -import org.fossasia.openevent.general.speakercall.Proposal import org.fossasia.openevent.general.speakercall.EditSpeakerViewModel +import org.fossasia.openevent.general.speakercall.Proposal +import org.fossasia.openevent.general.speakercall.SpeakersCall +import org.fossasia.openevent.general.speakercall.SpeakersCallProposalViewModel +import org.fossasia.openevent.general.speakercall.SpeakersCallViewModel import org.fossasia.openevent.general.speakers.Speaker import org.fossasia.openevent.general.speakers.SpeakerApi import org.fossasia.openevent.general.speakers.SpeakerService @@ -124,7 +125,6 @@ import org.koin.dsl.module import retrofit2.Retrofit import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory import retrofit2.converter.jackson.JacksonConverterFactory -import java.util.concurrent.TimeUnit val commonModule = module { single { Preference() } diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt index 2e49a5df7c..ea5f2227e5 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt @@ -25,50 +25,49 @@ import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import com.squareup.picasso.Picasso +import kotlinx.android.synthetic.main.content_event.view.alreadyRegisteredLayout import kotlinx.android.synthetic.main.content_event.view.eventDateDetailsFirst import kotlinx.android.synthetic.main.content_event.view.eventDateDetailsSecond import kotlinx.android.synthetic.main.content_event.view.eventDescription +import kotlinx.android.synthetic.main.content_event.view.eventImage import kotlinx.android.synthetic.main.content_event.view.eventLocationLinearLayout import kotlinx.android.synthetic.main.content_event.view.eventName import kotlinx.android.synthetic.main.content_event.view.eventOrganiserDescription import kotlinx.android.synthetic.main.content_event.view.eventTimingLinearLayout -import kotlinx.android.synthetic.main.content_event.view.imageMap -import kotlinx.android.synthetic.main.content_event.view.eventImage import kotlinx.android.synthetic.main.content_event.view.feedbackBtn -import kotlinx.android.synthetic.main.content_event.view.feedbackRv import kotlinx.android.synthetic.main.content_event.view.feedbackProgress +import kotlinx.android.synthetic.main.content_event.view.feedbackRv +import kotlinx.android.synthetic.main.content_event.view.imageMap import kotlinx.android.synthetic.main.content_event.view.nestedContentEventScroll import kotlinx.android.synthetic.main.content_event.view.noFeedBackTv +import kotlinx.android.synthetic.main.content_event.view.priceRangeTextView import kotlinx.android.synthetic.main.content_event.view.seeFeedbackTextView import kotlinx.android.synthetic.main.content_event.view.seeMore import kotlinx.android.synthetic.main.content_event.view.seeMoreOrganizer import kotlinx.android.synthetic.main.content_event.view.sessionContainer import kotlinx.android.synthetic.main.content_event.view.sessionsRv import kotlinx.android.synthetic.main.content_event.view.shimmerSimilarEvents +import kotlinx.android.synthetic.main.content_event.view.similarEventsContainer +import kotlinx.android.synthetic.main.content_event.view.similarEventsRecycler +import kotlinx.android.synthetic.main.content_event.view.socialLinkContainer +import kotlinx.android.synthetic.main.content_event.view.socialLinksRecycler import kotlinx.android.synthetic.main.content_event.view.speakerRv import kotlinx.android.synthetic.main.content_event.view.speakersContainer import kotlinx.android.synthetic.main.content_event.view.sponsorsRecyclerView import kotlinx.android.synthetic.main.content_event.view.sponsorsSummaryContainer -import kotlinx.android.synthetic.main.content_event.view.socialLinksRecycler -import kotlinx.android.synthetic.main.content_event.view.socialLinkContainer -import kotlinx.android.synthetic.main.content_event.view.similarEventsRecycler -import kotlinx.android.synthetic.main.content_event.view.similarEventsContainer -import kotlinx.android.synthetic.main.content_event.view.alreadyRegisteredLayout import kotlinx.android.synthetic.main.content_event.view.ticketPriceLinearLayout -import kotlinx.android.synthetic.main.content_event.view.priceRangeTextView -import kotlinx.android.synthetic.main.fragment_event.view.buttonTickets -import kotlinx.android.synthetic.main.fragment_event.view.eventErrorCard -import kotlinx.android.synthetic.main.fragment_event.view.container import kotlinx.android.synthetic.main.content_fetching_event_error.view.retry import kotlinx.android.synthetic.main.dialog_feedback.view.feedback import kotlinx.android.synthetic.main.dialog_feedback.view.feedbackTextInputLayout import kotlinx.android.synthetic.main.dialog_feedback.view.feedbackrating -import org.fossasia.openevent.general.utils.EVENT_IDENTIFIER +import kotlinx.android.synthetic.main.fragment_event.view.buttonTickets +import kotlinx.android.synthetic.main.fragment_event.view.container +import kotlinx.android.synthetic.main.fragment_event.view.eventErrorCard import org.fossasia.openevent.general.R -import org.fossasia.openevent.general.common.SessionClickListener -import org.fossasia.openevent.general.common.SpeakerClickListener import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener +import org.fossasia.openevent.general.common.SessionClickListener +import org.fossasia.openevent.general.common.SpeakerClickListener import org.fossasia.openevent.general.databinding.FragmentEventBinding import org.fossasia.openevent.general.event.EventUtils.loadMapUrl import org.fossasia.openevent.general.event.similarevent.SimilarEventsListAdapter @@ -79,18 +78,19 @@ import org.fossasia.openevent.general.social.SocialLinksRecyclerAdapter import org.fossasia.openevent.general.speakers.SpeakerRecyclerAdapter import org.fossasia.openevent.general.sponsor.SponsorClickListener import org.fossasia.openevent.general.sponsor.SponsorRecyclerAdapter +import org.fossasia.openevent.general.utils.EVENT_IDENTIFIER import org.fossasia.openevent.general.utils.Utils -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.fossasia.openevent.general.utils.nullToEmpty -import org.fossasia.openevent.general.utils.stripHtml import org.fossasia.openevent.general.utils.Utils.progressDialog -import org.fossasia.openevent.general.utils.Utils.show -import org.koin.androidx.viewmodel.ext.android.viewModel -import timber.log.Timber import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setSharedElementEnterTransition +import org.fossasia.openevent.general.utils.nullToEmpty +import org.fossasia.openevent.general.utils.stripHtml import org.jetbrains.anko.design.longSnackbar import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel +import timber.log.Timber const val EVENT_DETAIL_FRAGMENT = "eventDetailFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsViewModel.kt index 06852689d0..b39ce31dfa 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsViewModel.kt @@ -7,10 +7,10 @@ import androidx.lifecycle.ViewModel import androidx.paging.PagedList import androidx.paging.RxPagedListBuilder import io.reactivex.android.schedulers.AndroidSchedulers - import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign import io.reactivex.schedulers.Schedulers +import java.lang.StringBuilder import org.fossasia.openevent.general.BuildConfig.MAPBOX_KEY import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.AuthHolder @@ -27,8 +27,8 @@ import org.fossasia.openevent.general.order.Order import org.fossasia.openevent.general.order.OrderService import org.fossasia.openevent.general.sessions.Session import org.fossasia.openevent.general.sessions.SessionService -import org.fossasia.openevent.general.social.SocialLinksService import org.fossasia.openevent.general.social.SocialLink +import org.fossasia.openevent.general.social.SocialLinksService import org.fossasia.openevent.general.speakers.Speaker import org.fossasia.openevent.general.speakers.SpeakerService import org.fossasia.openevent.general.sponsor.Sponsor @@ -37,7 +37,6 @@ import org.fossasia.openevent.general.ticket.TicketPriceRange import org.fossasia.openevent.general.ticket.TicketService import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber -import java.lang.StringBuilder class EventDetailsViewModel( private val eventService: EventService, diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventService.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventService.kt index d562d0c6fa..62f1552374 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventService.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventService.kt @@ -3,6 +3,7 @@ package org.fossasia.openevent.general.event import io.reactivex.Completable import io.reactivex.Flowable import io.reactivex.Single +import java.util.Date import org.fossasia.openevent.general.event.faq.EventFAQ import org.fossasia.openevent.general.event.faq.EventFAQApi import org.fossasia.openevent.general.event.location.EventLocation @@ -18,7 +19,6 @@ import org.fossasia.openevent.general.sessions.track.Track import org.fossasia.openevent.general.speakercall.SpeakersCall import org.fossasia.openevent.general.speakercall.SpeakersCallDao import org.jetbrains.anko.collections.forEachWithIndex -import java.util.Date class EventService( private val eventApi: EventApi, diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt index 0234dec70e..8f2011d4ea 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt @@ -6,9 +6,13 @@ import android.view.LayoutInflater import androidx.appcompat.app.AlertDialog import androidx.preference.PreferenceManager import com.squareup.picasso.Picasso -import kotlinx.android.synthetic.main.dialog_login_to_like.view.getStartedButton +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale +import java.util.TimeZone import kotlinx.android.synthetic.main.dialog_login_to_like.view.eventImage import kotlinx.android.synthetic.main.dialog_login_to_like.view.eventName +import kotlinx.android.synthetic.main.dialog_login_to_like.view.getStartedButton import org.fossasia.openevent.general.OpenEventGeneral import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource @@ -17,10 +21,6 @@ import org.threeten.bp.ZoneId import org.threeten.bp.ZonedDateTime import org.threeten.bp.format.DateTimeFormatter import timber.log.Timber -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale -import java.util.TimeZone object EventUtils { diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt index 9a49db202c..a662079ca1 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt @@ -13,46 +13,46 @@ import androidx.core.view.isVisible import androidx.core.widget.NestedScrollView import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.recyclerview.widget.GridLayoutManager import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.FragmentNavigatorExtras +import androidx.recyclerview.widget.GridLayoutManager import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard import kotlinx.android.synthetic.main.content_no_internet.view.retry import kotlinx.android.synthetic.main.dialog_reset_password.view.confirmNewPassword import kotlinx.android.synthetic.main.dialog_reset_password.view.newPassword import kotlinx.android.synthetic.main.dialog_reset_password.view.textInputLayoutConfirmNewPassword import kotlinx.android.synthetic.main.dialog_reset_password.view.textInputLayoutNewPassword +import kotlinx.android.synthetic.main.fragment_events.view.emptyEventsText +import kotlinx.android.synthetic.main.fragment_events.view.eventsEmptyView import kotlinx.android.synthetic.main.fragment_events.view.eventsRecycler import kotlinx.android.synthetic.main.fragment_events.view.locationTextView -import kotlinx.android.synthetic.main.fragment_events.view.shimmerEvents -import kotlinx.android.synthetic.main.fragment_events.view.eventsEmptyView -import kotlinx.android.synthetic.main.fragment_events.view.emptyEventsText -import kotlinx.android.synthetic.main.fragment_events.view.scrollView +import kotlinx.android.synthetic.main.fragment_events.view.newNotificationDot +import kotlinx.android.synthetic.main.fragment_events.view.newNotificationDotToolbar import kotlinx.android.synthetic.main.fragment_events.view.notification +import kotlinx.android.synthetic.main.fragment_events.view.notificationToolbar +import kotlinx.android.synthetic.main.fragment_events.view.scrollView +import kotlinx.android.synthetic.main.fragment_events.view.shimmerEvents import kotlinx.android.synthetic.main.fragment_events.view.swiperefresh -import kotlinx.android.synthetic.main.fragment_events.view.newNotificationDot import kotlinx.android.synthetic.main.fragment_events.view.toolbar import kotlinx.android.synthetic.main.fragment_events.view.toolbarLayout -import kotlinx.android.synthetic.main.fragment_events.view.newNotificationDotToolbar -import kotlinx.android.synthetic.main.fragment_events.view.notificationToolbar -import org.fossasia.openevent.general.R import org.fossasia.openevent.general.BottomIconDoubleClick +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.StartupViewModel -import org.fossasia.openevent.general.utils.RESET_PASSWORD_TOKEN import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.data.Preference import org.fossasia.openevent.general.search.location.SAVED_LOCATION -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.RESET_PASSWORD_TOKEN import org.fossasia.openevent.general.utils.Utils.progressDialog +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.show +import org.fossasia.openevent.general.utils.extensions.hideWithFading +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setPostponeSharedElementTransition import org.fossasia.openevent.general.utils.extensions.setStartPostponedEnterTransition -import org.fossasia.openevent.general.utils.extensions.hideWithFading import org.fossasia.openevent.general.utils.extensions.showWithFading import org.jetbrains.anko.design.longSnackbar +import org.koin.androidx.viewmodel.ext.android.viewModel const val BEEN_TO_WELCOME_SCREEN = "beenToWelcomeScreen" const val EVENTS_FRAGMENT = "eventsFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/event/faq/EventFAQViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/event/faq/EventFAQViewModel.kt index ab6d40dd4b..77dbb74be5 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/faq/EventFAQViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/faq/EventFAQViewModel.kt @@ -5,11 +5,11 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.EventService +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class EventFAQViewModel(private val eventService: EventService, private val resource: Resource) : ViewModel() { diff --git a/app/src/main/java/org/fossasia/openevent/general/event/similarevent/SimilarEventViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/event/similarevent/SimilarEventViewHolder.kt index c7985e853d..4fdfa4257e 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/similarevent/SimilarEventViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/similarevent/SimilarEventViewHolder.kt @@ -1,7 +1,5 @@ package org.fossasia.openevent.general.event.similarevent -import org.fossasia.openevent.general.event.Event -import org.fossasia.openevent.general.event.EventUtils import android.widget.ImageView import androidx.recyclerview.widget.RecyclerView import kotlinx.android.synthetic.main.item_card_events.view.eventImage @@ -10,6 +8,8 @@ import kotlinx.android.synthetic.main.item_card_events.view.shareFab import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.databinding.ItemCardSimilarEventsBinding +import org.fossasia.openevent.general.event.Event +import org.fossasia.openevent.general.event.EventUtils class SimilarEventViewHolder( private val binding: ItemCardSimilarEventsBinding diff --git a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventApi.kt b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventApi.kt index c74d8e1a14..b676b661b7 100644 --- a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventApi.kt +++ b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventApi.kt @@ -2,12 +2,12 @@ package org.fossasia.openevent.general.favorite import io.reactivex.Completable import io.reactivex.Single -import retrofit2.http.GET -import retrofit2.http.POST import retrofit2.http.Body +import retrofit2.http.DELETE +import retrofit2.http.GET import retrofit2.http.Header +import retrofit2.http.POST import retrofit2.http.Path -import retrofit2.http.DELETE interface FavoriteEventApi { @GET("user-favourite-events?include=event") diff --git a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventViewHolder.kt index e1e3ca7a9a..4b7846c438 100644 --- a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventViewHolder.kt @@ -2,14 +2,14 @@ package org.fossasia.openevent.general.favorite import android.widget.ImageView import androidx.recyclerview.widget.RecyclerView +import kotlinx.android.synthetic.main.item_card_favorite_event.view.eventImage import kotlinx.android.synthetic.main.item_card_favorite_event.view.favoriteFab import kotlinx.android.synthetic.main.item_card_favorite_event.view.shareFab -import kotlinx.android.synthetic.main.item_card_favorite_event.view.eventImage import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener +import org.fossasia.openevent.general.databinding.ItemCardFavoriteEventBinding import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils -import org.fossasia.openevent.general.databinding.ItemCardFavoriteEventBinding class FavoriteEventViewHolder( private val binding: ItemCardFavoriteEventBinding diff --git a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsListAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsListAdapter.kt index 2fef77c21d..d40fe0b51f 100644 --- a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsListAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsListAdapter.kt @@ -3,11 +3,11 @@ package org.fossasia.openevent.general.favorite import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.ListAdapter -import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.EventsDiffCallback import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.databinding.ItemCardFavoriteEventBinding +import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils.getEventDateTime import org.fossasia.openevent.general.event.EventUtils.getFormattedDate diff --git a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsViewModel.kt index 790f32cfad..cd7c899d73 100644 --- a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteEventsViewModel.kt @@ -5,7 +5,6 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.common.SingleLiveEvent @@ -13,6 +12,7 @@ import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventId import org.fossasia.openevent.general.event.EventService +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class FavoriteEventsViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteFragment.kt b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteFragment.kt index a1c5467b4f..427b70736b 100644 --- a/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/favorite/FavoriteFragment.kt @@ -9,39 +9,39 @@ import androidx.core.view.isVisible import androidx.core.widget.NestedScrollView import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.recyclerview.widget.LinearLayoutManager import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.FragmentNavigatorExtras -import kotlinx.android.synthetic.main.fragment_favorite.view.noLikedLL +import androidx.recyclerview.widget.LinearLayoutManager import kotlinx.android.synthetic.main.fragment_favorite.view.favoriteEventsRecycler import kotlinx.android.synthetic.main.fragment_favorite.view.favoriteProgressBar import kotlinx.android.synthetic.main.fragment_favorite.view.findText -import kotlinx.android.synthetic.main.fragment_favorite.view.todayChip -import kotlinx.android.synthetic.main.fragment_favorite.view.tomorrowChip -import kotlinx.android.synthetic.main.fragment_favorite.view.weekendChip -import kotlinx.android.synthetic.main.fragment_favorite.view.monthChip import kotlinx.android.synthetic.main.fragment_favorite.view.likesNumber +import kotlinx.android.synthetic.main.fragment_favorite.view.likesTitle +import kotlinx.android.synthetic.main.fragment_favorite.view.monthChip +import kotlinx.android.synthetic.main.fragment_favorite.view.noLikedLL import kotlinx.android.synthetic.main.fragment_favorite.view.scrollView +import kotlinx.android.synthetic.main.fragment_favorite.view.todayChip +import kotlinx.android.synthetic.main.fragment_favorite.view.tomorrowChip import kotlinx.android.synthetic.main.fragment_favorite.view.toolbarLayout -import kotlinx.android.synthetic.main.fragment_favorite.view.likesTitle -import org.fossasia.openevent.general.R +import kotlinx.android.synthetic.main.fragment_favorite.view.weekendChip import org.fossasia.openevent.general.BottomIconDoubleClick -import org.fossasia.openevent.general.event.Event +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.data.Preference +import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils.getEventDateTime import org.fossasia.openevent.general.search.location.SAVED_LOCATION -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel -import timber.log.Timber import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.extensions.hideWithFading +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setPostponeSharedElementTransition import org.fossasia.openevent.general.utils.extensions.setStartPostponedEnterTransition import org.fossasia.openevent.general.utils.extensions.showWithFading -import org.fossasia.openevent.general.utils.extensions.hideWithFading import org.jetbrains.anko.design.longSnackbar import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel +import timber.log.Timber const val FAVORITE_FRAGMENT = "favoriteFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/feedback/FeedbackFragment.kt b/app/src/main/java/org/fossasia/openevent/general/feedback/FeedbackFragment.kt index 7da2b76db2..822cefa09c 100644 --- a/app/src/main/java/org/fossasia/openevent/general/feedback/FeedbackFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/feedback/FeedbackFragment.kt @@ -10,9 +10,9 @@ import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager -import kotlinx.android.synthetic.main.fragment_feedback.view.progressBar import kotlinx.android.synthetic.main.fragment_feedback.view.feedbackEmptyView import kotlinx.android.synthetic.main.fragment_feedback.view.feedbackRecyclerView +import kotlinx.android.synthetic.main.fragment_feedback.view.progressBar import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull diff --git a/app/src/main/java/org/fossasia/openevent/general/notification/NotificationFragment.kt b/app/src/main/java/org/fossasia/openevent/general/notification/NotificationFragment.kt index 3fb579123c..f47d8fdb93 100644 --- a/app/src/main/java/org/fossasia/openevent/general/notification/NotificationFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/notification/NotificationFragment.kt @@ -6,20 +6,20 @@ import android.view.MenuItem import android.view.View import android.view.ViewGroup import androidx.appcompat.view.ContextThemeWrapper -import androidx.fragment.app.Fragment import androidx.core.view.isVisible +import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation import androidx.recyclerview.widget.LinearLayoutManager import com.google.android.material.chip.Chip -import kotlinx.android.synthetic.main.content_no_internet.view.retry import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard +import kotlinx.android.synthetic.main.content_no_internet.view.retry +import kotlinx.android.synthetic.main.fragment_notification.view.filterChipGroup +import kotlinx.android.synthetic.main.fragment_notification.view.noNotification +import kotlinx.android.synthetic.main.fragment_notification.view.notificationCoordinatorLayout import kotlinx.android.synthetic.main.fragment_notification.view.notificationRecycler -import kotlinx.android.synthetic.main.fragment_notification.view.swiperefresh import kotlinx.android.synthetic.main.fragment_notification.view.shimmerNotifications -import kotlinx.android.synthetic.main.fragment_notification.view.notificationCoordinatorLayout -import kotlinx.android.synthetic.main.fragment_notification.view.noNotification -import kotlinx.android.synthetic.main.fragment_notification.view.filterChipGroup +import kotlinx.android.synthetic.main.fragment_notification.view.swiperefresh import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.LoginFragmentArgs import org.fossasia.openevent.general.data.Preference diff --git a/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt index 21a6285df9..ffdf3bab0e 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt @@ -14,16 +14,16 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard import kotlinx.android.synthetic.main.dialog_filter_order.view.completedOrdersCheckBox -import kotlinx.android.synthetic.main.dialog_filter_order.view.pendingOrdersCheckBox -import kotlinx.android.synthetic.main.dialog_filter_order.view.placedOrdersCheckBox import kotlinx.android.synthetic.main.dialog_filter_order.view.dateRadioButton import kotlinx.android.synthetic.main.dialog_filter_order.view.orderStatusRadioButton -import kotlinx.android.synthetic.main.fragment_expired_order.view.ordersRecycler +import kotlinx.android.synthetic.main.dialog_filter_order.view.pendingOrdersCheckBox +import kotlinx.android.synthetic.main.dialog_filter_order.view.placedOrdersCheckBox +import kotlinx.android.synthetic.main.fragment_expired_order.view.filterToolbar import kotlinx.android.synthetic.main.fragment_expired_order.view.noTicketsScreen +import kotlinx.android.synthetic.main.fragment_expired_order.view.ordersRecycler import kotlinx.android.synthetic.main.fragment_expired_order.view.shimmerSearch -import kotlinx.android.synthetic.main.fragment_expired_order.view.filterToolbar -import kotlinx.android.synthetic.main.fragment_expired_order.view.toolbar import kotlinx.android.synthetic.main.fragment_expired_order.view.swipeRefresh +import kotlinx.android.synthetic.main.fragment_expired_order.view.toolbar import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedFragment.kt index 5e7bbfcccb..4bb4b4327d 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedFragment.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.order import android.content.ActivityNotFoundException -import androidx.appcompat.app.AlertDialog import android.content.Intent +import android.net.Uri import android.os.Bundle import android.provider.CalendarContract import android.view.LayoutInflater @@ -12,6 +12,7 @@ import android.view.MenuItem import android.view.View import android.view.ViewGroup import android.widget.ImageView +import androidx.appcompat.app.AlertDialog import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer @@ -20,31 +21,30 @@ import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import kotlinx.android.synthetic.main.dialog_rate_us.view.rateEventyayButton -import kotlinx.android.synthetic.main.fragment_order_completed.view.similarEventsRecycler -import kotlinx.android.synthetic.main.fragment_order_completed.view.similarEventLayout -import kotlinx.android.synthetic.main.fragment_order_completed.view.shimmerSimilarEvents -import kotlinx.android.synthetic.main.fragment_order_completed.view.orderCoordinatorLayout import kotlinx.android.synthetic.main.fragment_order_completed.view.add import kotlinx.android.synthetic.main.fragment_order_completed.view.name +import kotlinx.android.synthetic.main.fragment_order_completed.view.orderCoordinatorLayout import kotlinx.android.synthetic.main.fragment_order_completed.view.share +import kotlinx.android.synthetic.main.fragment_order_completed.view.shimmerSimilarEvents +import kotlinx.android.synthetic.main.fragment_order_completed.view.similarEventLayout +import kotlinx.android.synthetic.main.fragment_order_completed.view.similarEventsRecycler import kotlinx.android.synthetic.main.fragment_order_completed.view.time import kotlinx.android.synthetic.main.fragment_order_completed.view.view +import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.data.Preference -import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.event.Event +import org.fossasia.openevent.general.event.EventUtils +import org.fossasia.openevent.general.event.RedirectToLogin import org.fossasia.openevent.general.event.similarevent.SimilarEventsListAdapter +import org.fossasia.openevent.general.search.ORDER_COMPLETED_FRAGMENT +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.stripHtml -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.utils.Utils.setToolbar import org.jetbrains.anko.design.longSnackbar -import android.net.Uri -import org.fossasia.openevent.general.BuildConfig -import org.fossasia.openevent.general.event.RedirectToLogin -import org.fossasia.openevent.general.search.ORDER_COMPLETED_FRAGMENT +import org.koin.androidx.viewmodel.ext.android.viewModel private const val DISPLAY_RATING_DIALOG = "displayRatingDialog" diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedViewModel.kt index 9bab47a4c3..fa8db24fb8 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderCompletedViewModel.kt @@ -10,7 +10,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign import io.reactivex.schedulers.Schedulers -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.common.SingleLiveEvent @@ -20,6 +19,7 @@ import org.fossasia.openevent.general.event.EventId import org.fossasia.openevent.general.event.EventService import org.fossasia.openevent.general.event.paging.SimilarEventsDataSourceFactory import org.fossasia.openevent.general.favorite.FavoriteEvent +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class OrderCompletedViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderDataSource.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderDataSource.kt index 280dbeb18f..1e67a2db23 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderDataSource.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderDataSource.kt @@ -5,6 +5,8 @@ import androidx.paging.PageKeyedDataSource import io.reactivex.Single import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign +import java.util.Date +import kotlin.collections.ArrayList import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.ORDER_STATUS_COMPLETED import org.fossasia.openevent.general.attendees.ORDER_STATUS_PENDING @@ -16,8 +18,6 @@ import org.fossasia.openevent.general.event.EventService import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber -import java.util.Date -import kotlin.collections.ArrayList class OrderDataSource( private val orderService: OrderService, diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsFragment.kt index db7f630536..cec051d9d4 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsFragment.kt @@ -10,38 +10,38 @@ import android.net.Uri import android.os.Bundle import android.os.Environment import android.view.LayoutInflater +import android.view.Menu +import android.view.MenuInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup -import android.view.Menu -import android.view.MenuInflater import androidx.core.content.ContextCompat import androidx.core.content.FileProvider import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.recyclerview.widget.LinearLayoutManager import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs +import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearSnapHelper import androidx.recyclerview.widget.RecyclerView import com.squareup.picasso.Picasso +import java.io.File +import java.io.FileOutputStream +import kotlinx.android.synthetic.main.fragment_order_details.view.backgroundImage import kotlinx.android.synthetic.main.fragment_order_details.view.orderDetailCoordinatorLayout import kotlinx.android.synthetic.main.fragment_order_details.view.orderDetailsRecycler -import kotlinx.android.synthetic.main.fragment_order_details.view.backgroundImage import kotlinx.android.synthetic.main.item_card_order_details.view.orderDetailCardView import kotlinx.android.synthetic.main.item_enlarged_qr.view.enlargedQrImage import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.R import org.fossasia.openevent.general.order.invoice.DownloadInvoiceService import org.fossasia.openevent.general.utils.Utils.progressDialog +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.utils.Utils.setToolbar import org.jetbrains.anko.design.longSnackbar import org.jetbrains.anko.design.snackbar -import java.io.File -import java.io.FileOutputStream +import org.koin.androidx.viewmodel.ext.android.viewModel class OrderDetailsFragment : Fragment() { diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsRecyclerAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsRecyclerAdapter.kt index 9c7fa55d95..54ef90fe85 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsRecyclerAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsRecyclerAdapter.kt @@ -1,13 +1,13 @@ package org.fossasia.openevent.general.order import android.graphics.Bitmap -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView +import kotlin.collections.ArrayList import org.fossasia.openevent.general.attendees.Attendee import org.fossasia.openevent.general.databinding.ItemCardOrderDetailsBinding import org.fossasia.openevent.general.event.Event -import kotlin.collections.ArrayList class OrderDetailsRecyclerAdapter : RecyclerView.Adapter() { diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewHolder.kt index 14cc92ed07..7187808e1d 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewHolder.kt @@ -7,14 +7,15 @@ import android.provider.CalendarContract import android.view.View import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView +import java.lang.StringBuilder import kotlinx.android.synthetic.main.item_card_order_details.view.calendar +import kotlinx.android.synthetic.main.item_card_order_details.view.checkedInLayout +import kotlinx.android.synthetic.main.item_card_order_details.view.downloadButton import kotlinx.android.synthetic.main.item_card_order_details.view.eventDetails import kotlinx.android.synthetic.main.item_card_order_details.view.map -import kotlinx.android.synthetic.main.item_card_order_details.view.qrCodeView -import kotlinx.android.synthetic.main.item_card_order_details.view.downloadButton -import kotlinx.android.synthetic.main.item_card_order_details.view.checkedInLayout -import kotlinx.android.synthetic.main.item_card_order_details.view.notCheckedInLayout import kotlinx.android.synthetic.main.item_card_order_details.view.notAvailableTextView +import kotlinx.android.synthetic.main.item_card_order_details.view.notCheckedInLayout +import kotlinx.android.synthetic.main.item_card_order_details.view.qrCodeView import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.Attendee import org.fossasia.openevent.general.databinding.ItemCardOrderDetailsBinding @@ -23,7 +24,6 @@ import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.event.EventUtils.loadMapUrl import org.fossasia.openevent.general.utils.stripHtml import org.jetbrains.anko.browse -import java.lang.StringBuilder class OrderDetailsViewHolder(private val binding: ItemCardOrderDetailsBinding) : RecyclerView.ViewHolder(binding.root) { private val qrCode = QrCode() diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt index 58ca14f9c6..349be8601f 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderDetailsViewModel.kt @@ -5,7 +5,6 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.Attendee import org.fossasia.openevent.general.auth.AuthHolder @@ -13,6 +12,7 @@ import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventService +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.utils.nullToEmpty import timber.log.Timber diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrderService.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrderService.kt index d0bd867f6a..e9231aaeee 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrderService.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrderService.kt @@ -3,11 +3,11 @@ package org.fossasia.openevent.general.order import io.reactivex.Single import org.fossasia.openevent.general.attendees.Attendee import org.fossasia.openevent.general.attendees.AttendeeDao +import org.fossasia.openevent.general.event.Event +import org.fossasia.openevent.general.event.EventDao import org.fossasia.openevent.general.paypal.Paypal import org.fossasia.openevent.general.paypal.PaypalApi import org.fossasia.openevent.general.paypal.PaypalPaymentResponse -import org.fossasia.openevent.general.event.Event -import org.fossasia.openevent.general.event.EventDao class OrderService( private val orderApi: OrderApi, diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrdersPagedListAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrdersPagedListAdapter.kt index ac8c66e361..987924d034 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrdersPagedListAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrdersPagedListAdapter.kt @@ -4,8 +4,8 @@ import android.view.LayoutInflater import android.view.ViewGroup import androidx.paging.PagedListAdapter import androidx.recyclerview.widget.DiffUtil -import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.databinding.ItemCardOrderBinding +import org.fossasia.openevent.general.event.Event class OrdersPagedListAdapter : PagedListAdapter, OrdersViewHolder>(OrdersDiffCallback()) { diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt index aabd441697..ec375360d5 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt @@ -11,36 +11,36 @@ import androidx.core.view.isVisible import androidx.core.widget.NestedScrollView import androidx.fragment.app.Fragment import androidx.lifecycle.Observer +import androidx.navigation.Navigation.findNavController import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import androidx.navigation.Navigation.findNavController import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard -import kotlinx.android.synthetic.main.dialog_filter_order.view.orderStatusRadioButton -import kotlinx.android.synthetic.main.dialog_filter_order.view.dateRadioButton import kotlinx.android.synthetic.main.dialog_filter_order.view.completedOrdersCheckBox +import kotlinx.android.synthetic.main.dialog_filter_order.view.dateRadioButton +import kotlinx.android.synthetic.main.dialog_filter_order.view.orderStatusRadioButton import kotlinx.android.synthetic.main.dialog_filter_order.view.pendingOrdersCheckBox import kotlinx.android.synthetic.main.dialog_filter_order.view.placedOrdersCheckBox +import kotlinx.android.synthetic.main.fragment_orders_under_user.view.filter +import kotlinx.android.synthetic.main.fragment_orders_under_user.view.filterToolbar import kotlinx.android.synthetic.main.fragment_orders_under_user.view.findMyTickets import kotlinx.android.synthetic.main.fragment_orders_under_user.view.noTicketsScreen import kotlinx.android.synthetic.main.fragment_orders_under_user.view.ordersRecycler +import kotlinx.android.synthetic.main.fragment_orders_under_user.view.pastEvent +import kotlinx.android.synthetic.main.fragment_orders_under_user.view.scrollView import kotlinx.android.synthetic.main.fragment_orders_under_user.view.shimmerSearch import kotlinx.android.synthetic.main.fragment_orders_under_user.view.swipeRefresh -import kotlinx.android.synthetic.main.fragment_orders_under_user.view.scrollView -import kotlinx.android.synthetic.main.fragment_orders_under_user.view.pastEvent import kotlinx.android.synthetic.main.fragment_orders_under_user.view.ticketsNumber -import kotlinx.android.synthetic.main.fragment_orders_under_user.view.toolbarLayout import kotlinx.android.synthetic.main.fragment_orders_under_user.view.ticketsTitle -import kotlinx.android.synthetic.main.fragment_orders_under_user.view.filterToolbar -import kotlinx.android.synthetic.main.fragment_orders_under_user.view.filter -import org.fossasia.openevent.general.R +import kotlinx.android.synthetic.main.fragment_orders_under_user.view.toolbarLayout import org.fossasia.openevent.general.BottomIconDoubleClick +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.hideWithFading +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.showWithFading import org.jetbrains.anko.design.longSnackbar +import org.koin.androidx.viewmodel.ext.android.viewModel const val ORDERS_FRAGMENT = "ordersFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrdersViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrdersViewHolder.kt index 4e74cb203c..5b1634ec38 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrdersViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrdersViewHolder.kt @@ -1,9 +1,9 @@ package org.fossasia.openevent.general.order import androidx.recyclerview.widget.RecyclerView +import org.fossasia.openevent.general.databinding.ItemCardOrderBinding import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils -import org.fossasia.openevent.general.databinding.ItemCardOrderBinding class OrdersViewHolder(private val binding: ItemCardOrderBinding) : RecyclerView.ViewHolder(binding.root) { diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchFilterFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchFilterFragment.kt index 1ecc16e766..ec4991d679 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchFilterFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchFilterFragment.kt @@ -12,16 +12,16 @@ import androidx.navigation.fragment.navArgs import kotlinx.android.synthetic.main.fragment_search_filter.view.callForSpeakerCheckBox import kotlinx.android.synthetic.main.fragment_search_filter.view.dateRadioButton import kotlinx.android.synthetic.main.fragment_search_filter.view.freeStuffCheckBox -import kotlinx.android.synthetic.main.fragment_search_filter.view.sessionsAndSpeakerCheckBox import kotlinx.android.synthetic.main.fragment_search_filter.view.nameRadioButton import kotlinx.android.synthetic.main.fragment_search_filter.view.radioGroup +import kotlinx.android.synthetic.main.fragment_search_filter.view.scrollView +import kotlinx.android.synthetic.main.fragment_search_filter.view.sessionsAndSpeakerCheckBox +import kotlinx.android.synthetic.main.fragment_search_filter.view.tick +import kotlinx.android.synthetic.main.fragment_search_filter.view.toolbar +import kotlinx.android.synthetic.main.fragment_search_filter.view.toolbarLayout import kotlinx.android.synthetic.main.fragment_search_filter.view.tvSelectCategory import kotlinx.android.synthetic.main.fragment_search_filter.view.tvSelectDate import kotlinx.android.synthetic.main.fragment_search_filter.view.tvSelectLocation -import kotlinx.android.synthetic.main.fragment_search_filter.view.toolbar -import kotlinx.android.synthetic.main.fragment_search_filter.view.toolbarLayout -import kotlinx.android.synthetic.main.fragment_search_filter.view.tick -import kotlinx.android.synthetic.main.fragment_search_filter.view.scrollView import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils.setToolbar import org.koin.androidx.viewmodel.ext.android.viewModel diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchFragment.kt index d45a2ddcb7..6033690047 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchFragment.kt @@ -9,36 +9,36 @@ import android.view.ViewGroup import android.view.inputmethod.EditorInfo import androidx.core.view.isVisible import androidx.fragment.app.Fragment +import androidx.navigation.Navigation.findNavController +import androidx.recyclerview.widget.LinearLayoutManager +import com.squareup.picasso.Picasso +import java.util.Calendar +import kotlinx.android.synthetic.main.fragment_search.view.backgroundImage +import kotlinx.android.synthetic.main.fragment_search.view.eventTypeTextView import kotlinx.android.synthetic.main.fragment_search.view.fabSearch import kotlinx.android.synthetic.main.fragment_search.view.locationTextView -import kotlinx.android.synthetic.main.fragment_search.view.timeTextView -import kotlinx.android.synthetic.main.fragment_search.view.eventTypeTextView -import kotlinx.android.synthetic.main.fragment_search.view.searchText +import kotlinx.android.synthetic.main.fragment_search.view.recentSearch import kotlinx.android.synthetic.main.fragment_search.view.searchInfoContainer +import kotlinx.android.synthetic.main.fragment_search.view.searchText +import kotlinx.android.synthetic.main.fragment_search.view.timeTextView import kotlinx.android.synthetic.main.fragment_search.view.toolbar -import kotlinx.android.synthetic.main.fragment_search.view.backgroundImage -import kotlinx.android.synthetic.main.fragment_search.view.recentSearch -import org.fossasia.openevent.general.R -import org.fossasia.openevent.general.utils.nullToEmpty -import org.koin.androidx.viewmodel.ext.android.viewModel -import androidx.navigation.Navigation.findNavController -import androidx.recyclerview.widget.LinearLayoutManager -import com.squareup.picasso.Picasso import org.fossasia.openevent.general.BottomIconDoubleClick import org.fossasia.openevent.general.ComplexBackPressFragment +import org.fossasia.openevent.general.R import org.fossasia.openevent.general.event.EventUtils.getFormattedDate import org.fossasia.openevent.general.event.EventUtils.getFormattedDateWithoutYear import org.fossasia.openevent.general.search.recentsearch.RecentSearchAdapter import org.fossasia.openevent.general.search.recentsearch.RecentSearchListener import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard +import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.showSoftKeyboard +import org.fossasia.openevent.general.utils.nullToEmpty +import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel import org.threeten.bp.LocalDate import org.threeten.bp.ZoneId import org.threeten.bp.format.DateTimeFormatter import org.threeten.bp.format.DateTimeParseException -import java.util.Calendar -import org.fossasia.openevent.general.utils.Utils.setToolbar -import org.fossasia.openevent.general.utils.Utils.showSoftKeyboard -import org.jetbrains.anko.design.snackbar const val SEARCH_FRAGMENT = "SearchFragment" const val RECENT_SEARCHES = "recentSearches" diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchPagedListAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchPagedListAdapter.kt index 780ba9b837..2b4a42dc83 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchPagedListAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchPagedListAdapter.kt @@ -1,15 +1,14 @@ package org.fossasia.openevent.general.search -import org.fossasia.openevent.general.favorite.FavoriteEventViewHolder - import android.view.LayoutInflater import android.view.ViewGroup import androidx.paging.PagedListAdapter -import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.EventsDiffCallback import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.databinding.ItemCardFavoriteEventBinding +import org.fossasia.openevent.general.event.Event +import org.fossasia.openevent.general.favorite.FavoriteEventViewHolder class SearchPagedListAdapter : PagedListAdapter(EventsDiffCallback()) { diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt index 55de2e6621..ab3de30bff 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt @@ -11,49 +11,49 @@ import android.view.ViewGroup import android.view.inputmethod.EditorInfo import android.widget.CompoundButton import android.widget.ImageView +import androidx.appcompat.view.ContextThemeWrapper import androidx.core.content.ContextCompat import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController +import androidx.navigation.fragment.FragmentNavigatorExtras import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager +import com.google.android.material.appbar.AppBarLayout import com.google.android.material.chip.Chip +import kotlin.math.abs import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard import kotlinx.android.synthetic.main.content_no_internet.view.retry +import kotlinx.android.synthetic.main.fragment_search_results.view.appBar import kotlinx.android.synthetic.main.fragment_search_results.view.chipGroup import kotlinx.android.synthetic.main.fragment_search_results.view.chipGroupLayout +import kotlinx.android.synthetic.main.fragment_search_results.view.clearSearchText import kotlinx.android.synthetic.main.fragment_search_results.view.eventsRecycler +import kotlinx.android.synthetic.main.fragment_search_results.view.filter import kotlinx.android.synthetic.main.fragment_search_results.view.noSearchResults +import kotlinx.android.synthetic.main.fragment_search_results.view.scrollView +import kotlinx.android.synthetic.main.fragment_search_results.view.searchText import kotlinx.android.synthetic.main.fragment_search_results.view.shimmerSearch import kotlinx.android.synthetic.main.fragment_search_results.view.toolbar import kotlinx.android.synthetic.main.fragment_search_results.view.toolbarLayout -import kotlinx.android.synthetic.main.fragment_search_results.view.searchText -import kotlinx.android.synthetic.main.fragment_search_results.view.filter -import kotlinx.android.synthetic.main.fragment_search_results.view.clearSearchText -import kotlinx.android.synthetic.main.fragment_search_results.view.scrollView import kotlinx.android.synthetic.main.fragment_search_results.view.toolbarTitle -import kotlinx.android.synthetic.main.fragment_search_results.view.appBar import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.EventClickListener import org.fossasia.openevent.general.common.FavoriteFabClickListener import org.fossasia.openevent.general.event.Event -import org.fossasia.openevent.general.event.types.EventType -import org.fossasia.openevent.general.utils.Utils.setToolbar -import org.fossasia.openevent.general.utils.extensions.nonNull -import org.jetbrains.anko.design.longSnackbar -import org.koin.androidx.viewmodel.ext.android.viewModel -import timber.log.Timber -import androidx.appcompat.view.ContextThemeWrapper -import androidx.navigation.fragment.FragmentNavigatorExtras -import com.google.android.material.appbar.AppBarLayout import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.event.RedirectToLogin +import org.fossasia.openevent.general.event.types.EventType import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.showSoftKeyboard +import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.extensions.setPostponeSharedElementTransition import org.fossasia.openevent.general.utils.extensions.setStartPostponedEnterTransition -import kotlin.math.abs +import org.jetbrains.anko.design.longSnackbar +import org.koin.androidx.viewmodel.ext.android.viewModel +import timber.log.Timber const val SEARCH_RESULTS_FRAGMENT = "searchResultsFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsViewModel.kt index ffee7a154b..6467bfe4c9 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsViewModel.kt @@ -11,6 +11,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign import io.reactivex.schedulers.Schedulers +import java.util.Date import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.common.SingleLiveEvent @@ -27,7 +28,6 @@ import org.fossasia.openevent.general.search.location.SAVED_LOCATION import org.fossasia.openevent.general.utils.DateTimeUtils import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber -import java.util.Date const val ORDER_COMPLETED_FRAGMENT = "orderCompletedFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchViewModel.kt index 94fa21177c..84ff7a3e97 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchViewModel.kt @@ -1,13 +1,13 @@ package org.fossasia.openevent.general.search import androidx.lifecycle.ViewModel +import java.lang.StringBuilder import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Preference import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.search.location.SAVED_LOCATION import org.fossasia.openevent.general.search.time.SAVED_TIME import org.fossasia.openevent.general.search.type.SAVED_TYPE -import java.lang.StringBuilder class SearchViewModel( private val preference: Preference, diff --git a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt index a79feacd90..32ea329325 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt @@ -20,20 +20,20 @@ import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import io.reactivex.subjects.PublishSubject -import kotlinx.android.synthetic.main.fragment_search_location.view.scrollView -import kotlinx.android.synthetic.main.fragment_search_location.view.toolbarTitle -import kotlinx.android.synthetic.main.fragment_search_location.view.toolbarLayout -import kotlinx.android.synthetic.main.fragment_search_location.view.placeSuggestionsCard -import kotlinx.android.synthetic.main.fragment_search_location.view.recentSearchLayout -import kotlinx.android.synthetic.main.fragment_search_location.view.recentSearchRv -import kotlinx.android.synthetic.main.fragment_search_location.view.popularLocationsLayout import kotlinx.android.synthetic.main.fragment_search_location.view.currentLocation -import kotlinx.android.synthetic.main.fragment_search_location.view.popularLocationsRv import kotlinx.android.synthetic.main.fragment_search_location.view.locationProgressBar import kotlinx.android.synthetic.main.fragment_search_location.view.locationSearchView +import kotlinx.android.synthetic.main.fragment_search_location.view.placeSuggestionsCard +import kotlinx.android.synthetic.main.fragment_search_location.view.popularLocationsLayout +import kotlinx.android.synthetic.main.fragment_search_location.view.popularLocationsRv +import kotlinx.android.synthetic.main.fragment_search_location.view.recentSearchLayout +import kotlinx.android.synthetic.main.fragment_search_location.view.recentSearchRv import kotlinx.android.synthetic.main.fragment_search_location.view.rvAutoPlaces -import kotlinx.android.synthetic.main.fragment_search_location.view.toolbar +import kotlinx.android.synthetic.main.fragment_search_location.view.scrollView import kotlinx.android.synthetic.main.fragment_search_location.view.shimmerSearchEventTypes +import kotlinx.android.synthetic.main.fragment_search_location.view.toolbar +import kotlinx.android.synthetic.main.fragment_search_location.view.toolbarLayout +import kotlinx.android.synthetic.main.fragment_search_location.view.toolbarTitle import org.fossasia.openevent.general.R import org.fossasia.openevent.general.search.SEARCH_FILTER_FRAGMENT import org.fossasia.openevent.general.search.SEARCH_FRAGMENT diff --git a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationViewModel.kt index d0c6c4441c..addb6fd668 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationViewModel.kt @@ -1,27 +1,27 @@ package org.fossasia.openevent.general.search.location -import androidx.lifecycle.MutableLiveData import androidx.lifecycle.LiveData +import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import com.mapbox.api.geocoding.v5.MapboxGeocoding import com.mapbox.api.geocoding.v5.models.CarmenFeature import io.reactivex.Observable -import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers -import org.fossasia.openevent.general.BuildConfig import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.CompositeDisposable +import io.reactivex.rxkotlin.plusAssign import io.reactivex.schedulers.Schedulers +import java.lang.StringBuilder +import java.util.concurrent.TimeUnit +import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Preference import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.event.EventService import org.fossasia.openevent.general.event.location.EventLocation +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.jetbrains.anko.doAsync import org.jetbrains.anko.uiThread import timber.log.Timber -import java.lang.StringBuilder -import java.util.concurrent.TimeUnit const val SAVED_LOCATION = "LOCATION" const val SAVED_LOCATION_LIST = "LOCATION_LIST" diff --git a/app/src/main/java/org/fossasia/openevent/general/search/recentsearch/RecentSearchViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/search/recentsearch/RecentSearchViewHolder.kt index ebba3bb0f5..53cb177ca6 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/recentsearch/RecentSearchViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/recentsearch/RecentSearchViewHolder.kt @@ -2,9 +2,9 @@ package org.fossasia.openevent.general.search.recentsearch import android.view.View import androidx.recyclerview.widget.RecyclerView +import kotlinx.android.synthetic.main.item_recent_search.view.clearRecent import kotlinx.android.synthetic.main.item_recent_search.view.recentSearchLocation import kotlinx.android.synthetic.main.item_recent_search.view.recentSearchText -import kotlinx.android.synthetic.main.item_recent_search.view.clearRecent class RecentSearchViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { diff --git a/app/src/main/java/org/fossasia/openevent/general/search/time/SearchTimeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/time/SearchTimeFragment.kt index 1488b0e943..e886f7c16e 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/time/SearchTimeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/time/SearchTimeFragment.kt @@ -8,18 +8,18 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs +import java.util.Calendar import kotlinx.android.synthetic.main.fragment_search_time.view.anytimeTextView +import kotlinx.android.synthetic.main.fragment_search_time.view.nextMonthTextView +import kotlinx.android.synthetic.main.fragment_search_time.view.thisWeekendTextView +import kotlinx.android.synthetic.main.fragment_search_time.view.timeTextView import kotlinx.android.synthetic.main.fragment_search_time.view.todayTextView import kotlinx.android.synthetic.main.fragment_search_time.view.tomorrowTextView -import kotlinx.android.synthetic.main.fragment_search_time.view.thisWeekendTextView -import kotlinx.android.synthetic.main.fragment_search_time.view.nextMonthTextView import kotlinx.android.synthetic.main.fragment_search_time.view.toolbar -import kotlinx.android.synthetic.main.fragment_search_time.view.timeTextView import org.fossasia.openevent.general.R import org.fossasia.openevent.general.event.EventUtils.getSimpleFormattedDate import org.fossasia.openevent.general.search.SEARCH_FILTER_FRAGMENT import org.fossasia.openevent.general.search.SearchFilterFragmentArgs -import java.util.Calendar import org.fossasia.openevent.general.utils.Utils.setToolbar import org.koin.androidx.viewmodel.ext.android.viewModel diff --git a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt index 2a0a6ef8d5..f306ccbbb2 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt @@ -10,8 +10,8 @@ import androidx.lifecycle.Observer import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager -import kotlinx.android.synthetic.main.content_no_internet.view.retry import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard +import kotlinx.android.synthetic.main.content_no_internet.view.retry import kotlinx.android.synthetic.main.fragment_search_type.view.eventTypesRecyclerView import kotlinx.android.synthetic.main.fragment_search_type.view.eventTypesTextTitle import kotlinx.android.synthetic.main.fragment_search_type.view.shimmerSearchEventTypes diff --git a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeViewModel.kt index bed733bf4f..694411e29e 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeViewModel.kt @@ -5,11 +5,11 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.connectivity.MutableConnectionLiveData import org.fossasia.openevent.general.data.Preference import org.fossasia.openevent.general.event.EventService import org.fossasia.openevent.general.event.types.EventType +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber const val SAVED_TYPE = "TYPE" diff --git a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionApi.kt b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionApi.kt index 153b53a34a..d0078b54f7 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionApi.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionApi.kt @@ -3,12 +3,12 @@ package org.fossasia.openevent.general.sessions import io.reactivex.Single import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.speakercall.Proposal +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.PATCH +import retrofit2.http.POST import retrofit2.http.Path import retrofit2.http.Query -import retrofit2.http.Body -import retrofit2.http.POST -import retrofit2.http.PATCH interface SessionApi { diff --git a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionFragment.kt b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionFragment.kt index 52df988826..72819f3269 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionFragment.kt @@ -13,39 +13,39 @@ import android.view.ViewGroup import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.navigation.fragment.navArgs -import com.squareup.picasso.Picasso import androidx.navigation.Navigation.findNavController +import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL +import com.squareup.picasso.Picasso import kotlinx.android.synthetic.main.fragment_session.view.progressBar -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTrack import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailAbstract -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLanguage +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailAbstractContainer +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailAbstractSeeMore import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailContainer +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailEndTime +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailInfoLocation +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLanguage import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLanguageContainer -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocationInfoContainer import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocation -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTimeContainer +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocationContainer import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocationImageMap -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailType +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocationInfoContainer import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailName -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailEndTime +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailSignUpButton +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailSpeakersContainer import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailStartTime -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailLocationContainer -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailInfoLocation -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailAbstractContainer -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailAbstractSeeMore +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTimeContainer +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTrack import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTrackContainer -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailSignUpButton import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailTrackIcon -import kotlinx.android.synthetic.main.fragment_session.view.speakersUnderSessionRecycler +import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailType import kotlinx.android.synthetic.main.fragment_session.view.speakersProgressBar -import kotlinx.android.synthetic.main.fragment_session.view.sessionDetailSpeakersContainer +import kotlinx.android.synthetic.main.fragment_session.view.speakersUnderSessionRecycler import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SpeakerClickListener -import org.fossasia.openevent.general.speakers.SpeakerRecyclerAdapter import org.fossasia.openevent.general.event.EventUtils +import org.fossasia.openevent.general.speakers.SpeakerRecyclerAdapter import org.fossasia.openevent.general.utils.Utils import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull diff --git a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewHolder.kt index c7f7b2ae1c..71ed00ef96 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewHolder.kt @@ -10,8 +10,8 @@ import kotlinx.android.synthetic.main.item_session.view.sessiontime import kotlinx.android.synthetic.main.item_session.view.shortAbstract import kotlinx.android.synthetic.main.item_session.view.title import kotlinx.android.synthetic.main.item_session.view.trackDetail -import kotlinx.android.synthetic.main.item_session.view.trackText import kotlinx.android.synthetic.main.item_session.view.trackIcon +import kotlinx.android.synthetic.main.item_session.view.trackText import org.fossasia.openevent.general.common.SessionClickListener import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.utils.nullToEmpty diff --git a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewModel.kt index 1b777df08c..34f74f2784 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sessions/SessionViewModel.kt @@ -3,9 +3,9 @@ package org.fossasia.openevent.general.sessions import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel -import org.fossasia.openevent.general.BuildConfig.MAPBOX_KEY import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign +import org.fossasia.openevent.general.BuildConfig.MAPBOX_KEY import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource diff --git a/app/src/main/java/org/fossasia/openevent/general/sessions/track/TrackConverter.kt b/app/src/main/java/org/fossasia/openevent/general/sessions/track/TrackConverter.kt index 39f996e391..025cc9f405 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sessions/track/TrackConverter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sessions/track/TrackConverter.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.sessions.track import androidx.room.TypeConverter -import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper class TrackConverter { diff --git a/app/src/main/java/org/fossasia/openevent/general/settings/SettingsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/settings/SettingsFragment.kt index 0e2214911d..aa46191d0f 100644 --- a/app/src/main/java/org/fossasia/openevent/general/settings/SettingsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/settings/SettingsFragment.kt @@ -11,22 +11,23 @@ import android.webkit.URLUtil import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.core.view.isVisible -import androidx.navigation.fragment.findNavController import androidx.lifecycle.Observer +import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import androidx.preference.Preference import androidx.preference.PreferenceCategory -import androidx.preference.PreferenceManager import androidx.preference.PreferenceFragmentCompat -import kotlinx.android.synthetic.main.dialog_api_configuration.view.urlTextInputLayout -import kotlinx.android.synthetic.main.dialog_api_configuration.view.urlEditText +import androidx.preference.PreferenceManager +import java.util.prefs.PreferenceChangeEvent +import java.util.prefs.PreferenceChangeListener import kotlinx.android.synthetic.main.dialog_api_configuration.view.urlCheckBox -import org.jetbrains.anko.design.snackbar -import kotlinx.android.synthetic.main.dialog_change_password.view.oldPassword -import kotlinx.android.synthetic.main.dialog_change_password.view.newPassword +import kotlinx.android.synthetic.main.dialog_api_configuration.view.urlEditText +import kotlinx.android.synthetic.main.dialog_api_configuration.view.urlTextInputLayout import kotlinx.android.synthetic.main.dialog_change_password.view.confirmNewPassword -import kotlinx.android.synthetic.main.dialog_change_password.view.textInputLayoutNewPassword +import kotlinx.android.synthetic.main.dialog_change_password.view.newPassword +import kotlinx.android.synthetic.main.dialog_change_password.view.oldPassword import kotlinx.android.synthetic.main.dialog_change_password.view.textInputLayoutConfirmNewPassword +import kotlinx.android.synthetic.main.dialog_change_password.view.textInputLayoutNewPassword import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.FDROID_BUILD_FLAVOR import org.fossasia.openevent.general.PLAY_STORE_BUILD_FLAVOR @@ -36,12 +37,11 @@ import org.fossasia.openevent.general.auth.ProfileViewModel import org.fossasia.openevent.general.auth.SmartAuthUtil import org.fossasia.openevent.general.auth.SmartAuthViewModel import org.fossasia.openevent.general.utils.Utils -import org.fossasia.openevent.general.utils.nullToEmpty -import org.koin.androidx.viewmodel.ext.android.viewModel -import java.util.prefs.PreferenceChangeEvent -import java.util.prefs.PreferenceChangeListener import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull +import org.fossasia.openevent.general.utils.nullToEmpty +import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel const val LOCAL_TIMEZONE = "localTimeZone" diff --git a/app/src/main/java/org/fossasia/openevent/general/settings/SettingsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/settings/SettingsViewModel.kt index 58dddd2c9a..1c42e204d1 100644 --- a/app/src/main/java/org/fossasia/openevent/general/settings/SettingsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/settings/SettingsViewModel.kt @@ -7,11 +7,11 @@ import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign import org.fossasia.openevent.general.BuildConfig import org.fossasia.openevent.general.R -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.auth.AuthService import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Preference import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber const val API_URL = "apiUrl" diff --git a/app/src/main/java/org/fossasia/openevent/general/social/SocialLinksRecyclerAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/social/SocialLinksRecyclerAdapter.kt index be8dadca46..59f3000ac4 100644 --- a/app/src/main/java/org/fossasia/openevent/general/social/SocialLinksRecyclerAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/social/SocialLinksRecyclerAdapter.kt @@ -1,10 +1,10 @@ package org.fossasia.openevent.general.social -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup -import org.fossasia.openevent.general.R +import androidx.recyclerview.widget.RecyclerView import java.util.ArrayList +import org.fossasia.openevent.general.R class SocialLinksRecyclerAdapter : RecyclerView.Adapter() { diff --git a/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerFragment.kt b/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerFragment.kt index 13520f79d9..00fdd56fd1 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerFragment.kt @@ -23,41 +23,46 @@ import androidx.navigation.fragment.navArgs import com.google.android.material.textfield.TextInputLayout import com.squareup.picasso.MemoryPolicy import com.squareup.picasso.Picasso +import java.io.ByteArrayOutputStream +import java.io.File +import java.io.FileNotFoundException +import java.io.FileOutputStream +import java.io.IOException import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.editImage -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.takeImage -import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.replaceImage import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.removeImage -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerName -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerImage -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerOrganization +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.replaceImage +import kotlinx.android.synthetic.main.dialog_edit_profile_image.view.takeImage +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerCountry +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerCountryLayout import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerEmail -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerPosition -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerShortBio -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerWebsite -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerTwitter -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.submitButton import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerEmailLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerNameLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerOrgLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerPositionLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerShortBioLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerWebsiteLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerTwitterLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLongBio -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLongBioLayout import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerFacebook import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerGithub import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerGithubLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerHeardFrom +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerHeardFromLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerImage import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLinkedIn import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLinkedInLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLongBio +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerLongBioLayout import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerMobile import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerMobileLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerCountry -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerCountryLayout -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerHeardFrom -import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerHeardFromLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerName +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerNameLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerOrgLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerOrganization +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerPosition +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerPositionLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerShortBio +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerShortBioLayout import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerSpeakingExp import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerSpeakingExpLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerTwitter +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerTwitterLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerWebsite +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.speakerWebsiteLayout +import kotlinx.android.synthetic.main.fragment_proposal_speaker.view.submitButton import org.fossasia.openevent.general.CircleTransform import org.fossasia.openevent.general.ComplexBackPressFragment import org.fossasia.openevent.general.R @@ -68,11 +73,11 @@ import org.fossasia.openevent.general.auth.UserId import org.fossasia.openevent.general.event.EventId import org.fossasia.openevent.general.speakercall.form.SpeakerIdentifier import org.fossasia.openevent.general.speakers.Speaker -import org.fossasia.openevent.general.utils.Utils.progressDialog -import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard +import org.fossasia.openevent.general.utils.Utils.progressDialog import org.fossasia.openevent.general.utils.Utils.requireDrawable import org.fossasia.openevent.general.utils.Utils.setToolbar +import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.checkEmpty import org.fossasia.openevent.general.utils.emptyToNull import org.fossasia.openevent.general.utils.extensions.nonNull @@ -81,11 +86,6 @@ import org.fossasia.openevent.general.utils.setRequired import org.jetbrains.anko.design.snackbar import org.koin.androidx.viewmodel.ext.android.viewModel import timber.log.Timber -import java.io.FileNotFoundException -import java.io.File -import java.io.IOException -import java.io.FileOutputStream -import java.io.ByteArrayOutputStream class EditSpeakerFragment : Fragment(), ComplexBackPressFragment { private lateinit var rootView: View diff --git a/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerViewModel.kt index d238fc265f..465ea8df33 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakercall/EditSpeakerViewModel.kt @@ -5,6 +5,7 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign +import java.io.File import org.fossasia.openevent.general.R import org.fossasia.openevent.general.attendees.forms.CustomForm import org.fossasia.openevent.general.auth.AuthHolder @@ -17,7 +18,6 @@ import org.fossasia.openevent.general.speakers.Speaker import org.fossasia.openevent.general.speakers.SpeakerService import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber -import java.io.File class EditSpeakerViewModel( private val resource: Resource, diff --git a/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallFragment.kt b/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallFragment.kt index 50be806c16..d07b924612 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallFragment.kt @@ -1,6 +1,5 @@ package org.fossasia.openevent.general.speakercall -import androidx.appcompat.app.AlertDialog import android.os.Bundle import android.text.Html import android.text.method.LinkMovementMethod @@ -8,28 +7,29 @@ import android.view.LayoutInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs +import java.util.Date +import kotlinx.android.synthetic.main.fragment_speakers_call.view.progressBar +import kotlinx.android.synthetic.main.fragment_speakers_call.view.speakersCallContainer import kotlinx.android.synthetic.main.fragment_speakers_call.view.speakersCallDescription import kotlinx.android.synthetic.main.fragment_speakers_call.view.speakersCallEmptyView -import kotlinx.android.synthetic.main.fragment_speakers_call.view.timeStatus import kotlinx.android.synthetic.main.fragment_speakers_call.view.speakersCallTimeDetail -import kotlinx.android.synthetic.main.fragment_speakers_call.view.speakersCallContainer import kotlinx.android.synthetic.main.fragment_speakers_call.view.submitProposalButton -import kotlinx.android.synthetic.main.fragment_speakers_call.view.progressBar +import kotlinx.android.synthetic.main.fragment_speakers_call.view.timeStatus import org.fossasia.openevent.general.R import org.fossasia.openevent.general.event.EventUtils.getEventDateTime import org.fossasia.openevent.general.event.EventUtils.getFormattedDate -import org.koin.androidx.viewmodel.ext.android.viewModel import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel import org.threeten.bp.DateTimeUtils -import java.util.Date const val SPEAKERS_CALL_FRAGMENT = "speakersCallFragment" diff --git a/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallProposalFragment.kt b/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallProposalFragment.kt index b52694db30..baa49a9d36 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallProposalFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallProposalFragment.kt @@ -17,39 +17,39 @@ import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs import com.google.android.material.textfield.TextInputLayout import com.squareup.picasso.Picasso +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.comment +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.commentsLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.expandSpeakerDetailButton +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.language +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.languageLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.longAbstract +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.longAbstractLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.shortAbstract +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.shortAbstractLayout import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerAvatar -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerNameLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerEmailLayout import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerBioLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerOrganizationLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerCountry import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerCountryLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerPositionLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerName import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerEmail -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerShortBio +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerEmailLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerInfoContainer +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerName +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerNameLayout import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerOrganization -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerCountry +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerOrganizationLayout import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerPosition +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerPositionLayout import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerProgressBar -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerInfoContainer -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.expandSpeakerDetailButton +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerShortBio import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerWebsite import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.speakerWebsiteLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.subTitle +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.subTitleLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.submitProposalButton import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.title import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.titleLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.submitProposalButton -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.trackSelector import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.trackContainer -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.comment -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.language -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.shortAbstract -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.longAbstract -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.longAbstractLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.shortAbstractLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.commentsLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.languageLayout -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.subTitle -import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.subTitleLayout +import kotlinx.android.synthetic.main.fragment_speakers_call_proposal.view.trackSelector import org.fossasia.openevent.general.CircleTransform import org.fossasia.openevent.general.ComplexBackPressFragment import org.fossasia.openevent.general.R @@ -64,10 +64,10 @@ import org.fossasia.openevent.general.utils.Utils import org.fossasia.openevent.general.utils.Utils.show import org.fossasia.openevent.general.utils.checkEmpty import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel import org.fossasia.openevent.general.utils.nullToEmpty import org.fossasia.openevent.general.utils.setRequired import org.jetbrains.anko.design.snackbar +import org.koin.androidx.viewmodel.ext.android.viewModel private const val AUDIO_TYPE = 1 private const val SLIDES_TYPE = 2 diff --git a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerApi.kt b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerApi.kt index 9846c4c8a2..a2c5b337f3 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerApi.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerApi.kt @@ -2,12 +2,12 @@ package org.fossasia.openevent.general.speakers import io.reactivex.Single import org.fossasia.openevent.general.attendees.forms.CustomForm +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.PATCH +import retrofit2.http.POST import retrofit2.http.Path import retrofit2.http.Query -import retrofit2.http.POST -import retrofit2.http.Body -import retrofit2.http.PATCH interface SpeakerApi { diff --git a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerFragment.kt b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerFragment.kt index 5408edbbed..b7dc57bf23 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerFragment.kt @@ -13,10 +13,10 @@ import androidx.navigation.fragment.navArgs import com.squareup.picasso.Picasso import kotlinx.android.synthetic.main.fragment_speaker.view.* import org.fossasia.openevent.general.CircleTransform -import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils.openUrl import org.fossasia.openevent.general.utils.Utils.requireDrawable +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.extensions.nonNull import org.fossasia.openevent.general.utils.stripHtml import org.jetbrains.anko.design.snackbar diff --git a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerViewModel.kt index 70bba41a62..2160ddae76 100644 --- a/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/speakers/SpeakerViewModel.kt @@ -3,13 +3,12 @@ package org.fossasia.openevent.general.speakers import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel - import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class SpeakerViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsDetailAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsDetailAdapter.kt index 9c3383908c..2fb29e5ded 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsDetailAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsDetailAdapter.kt @@ -6,10 +6,10 @@ import android.view.ViewGroup import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import com.squareup.picasso.Picasso -import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailLogo import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailDescription -import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailType +import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailLogo import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailName +import kotlinx.android.synthetic.main.item_sponsor_detail.view.sponsorDetailType import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.utils.Utils diff --git a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsFragment.kt index a5d9a0263b..4ae078496e 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsFragment.kt @@ -11,8 +11,8 @@ import androidx.lifecycle.Observer import androidx.navigation.fragment.navArgs import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import kotlinx.android.synthetic.main.fragment_sponsors.view.sponsorsDetailRecyclerView import kotlinx.android.synthetic.main.fragment_sponsors.view.sponsorDetailProgressBar +import kotlinx.android.synthetic.main.fragment_sponsors.view.sponsorsDetailRecyclerView import org.fossasia.openevent.general.R import org.fossasia.openevent.general.utils.Utils import org.fossasia.openevent.general.utils.extensions.nonNull diff --git a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsViewModel.kt index 769d3784ba..9eafcdf6f2 100644 --- a/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/sponsor/SponsorsViewModel.kt @@ -5,10 +5,10 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.common.SingleLiveEvent import org.fossasia.openevent.general.data.Resource +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import timber.log.Timber class SponsorsViewModel( diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsRecyclerAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsRecyclerAdapter.kt index 513ebef749..84f0f864c2 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsRecyclerAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsRecyclerAdapter.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.ticket -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView import org.fossasia.openevent.general.R class TicketDetailsRecyclerAdapter : RecyclerView.Adapter() { diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsViewHolder.kt index 2e36219c6d..1db10456d2 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketDetailsViewHolder.kt @@ -1,11 +1,11 @@ package org.fossasia.openevent.general.ticket -import androidx.recyclerview.widget.RecyclerView import android.view.View -import kotlinx.android.synthetic.main.item_ticket_details.view.ticketName +import androidx.recyclerview.widget.RecyclerView import kotlinx.android.synthetic.main.item_ticket_details.view.price import kotlinx.android.synthetic.main.item_ticket_details.view.qty import kotlinx.android.synthetic.main.item_ticket_details.view.subTotal +import kotlinx.android.synthetic.main.item_ticket_details.view.ticketName import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketService.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketService.kt index 2e02b9e6cf..f5f8fadf8a 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketService.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketService.kt @@ -2,10 +2,10 @@ package org.fossasia.openevent.general.ticket import io.reactivex.Flowable import io.reactivex.Single +import java.util.Date import org.fossasia.openevent.general.discount.DiscountApi import org.fossasia.openevent.general.discount.DiscountCode import org.fossasia.openevent.general.event.EventUtils -import java.util.Date class TicketService( private val ticketApi: TicketApi, diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt index 6eea59b283..aeb22b4195 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt @@ -3,8 +3,8 @@ package org.fossasia.openevent.general.ticket import android.graphics.Color import android.graphics.Paint import android.text.Editable -import android.text.TextWatcher import android.text.Html +import android.text.TextWatcher import android.view.View import android.view.ViewGroup import android.widget.AdapterView @@ -12,30 +12,30 @@ import android.widget.ArrayAdapter import android.widget.TextView import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView -import kotlinx.android.synthetic.main.item_ticket.view.order -import kotlinx.android.synthetic.main.item_ticket.view.orderRange -import kotlinx.android.synthetic.main.item_ticket.view.price -import kotlinx.android.synthetic.main.item_ticket.view.ticketName +import java.util.Date +import kotlin.collections.ArrayList +import kotlinx.android.synthetic.main.item_ticket.view.description import kotlinx.android.synthetic.main.item_ticket.view.discountPrice import kotlinx.android.synthetic.main.item_ticket.view.donationInput +import kotlinx.android.synthetic.main.item_ticket.view.moreInfoSection +import kotlinx.android.synthetic.main.item_ticket.view.order import kotlinx.android.synthetic.main.item_ticket.view.orderQtySection +import kotlinx.android.synthetic.main.item_ticket.view.orderRange +import kotlinx.android.synthetic.main.item_ticket.view.price +import kotlinx.android.synthetic.main.item_ticket.view.priceInfo import kotlinx.android.synthetic.main.item_ticket.view.priceSection +import kotlinx.android.synthetic.main.item_ticket.view.saleInfo +import kotlinx.android.synthetic.main.item_ticket.view.seeMoreInfoText import kotlinx.android.synthetic.main.item_ticket.view.taxInfo +import kotlinx.android.synthetic.main.item_ticket.view.ticketDateText +import kotlinx.android.synthetic.main.item_ticket.view.ticketName import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource -import kotlinx.android.synthetic.main.item_ticket.view.priceInfo -import kotlinx.android.synthetic.main.item_ticket.view.moreInfoSection -import kotlinx.android.synthetic.main.item_ticket.view.seeMoreInfoText -import kotlinx.android.synthetic.main.item_ticket.view.ticketDateText -import kotlinx.android.synthetic.main.item_ticket.view.saleInfo -import kotlinx.android.synthetic.main.item_ticket.view.description import org.fossasia.openevent.general.discount.DiscountCode import org.fossasia.openevent.general.event.EventUtils import org.fossasia.openevent.general.event.EventUtils.getFormattedDate import org.fossasia.openevent.general.event.tax.Tax import org.threeten.bp.DateTimeUtils -import java.util.Date -import kotlin.collections.ArrayList const val AMOUNT = "amount" const val TICKET_TYPE_FREE = "free" diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt index 727b76a359..e6d53cd724 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt @@ -1,49 +1,49 @@ package org.fossasia.openevent.general.ticket -import androidx.appcompat.app.AlertDialog import android.os.Bundle import android.text.SpannableStringBuilder import android.view.LayoutInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.core.view.isGone import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.lifecycle.Observer -import androidx.recyclerview.widget.LinearLayoutManager -import androidx.recyclerview.widget.RecyclerView import androidx.navigation.Navigation.findNavController import androidx.navigation.fragment.navArgs -import kotlinx.android.synthetic.main.content_no_internet.view.retry +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView +import java.util.Currency +import kotlin.collections.ArrayList import kotlinx.android.synthetic.main.content_no_internet.view.noInternetCard +import kotlinx.android.synthetic.main.content_no_internet.view.retry import kotlinx.android.synthetic.main.fragment_tickets.ticketsCoordinatorLayout +import kotlinx.android.synthetic.main.fragment_tickets.view.applyButton +import kotlinx.android.synthetic.main.fragment_tickets.view.applyDiscountCode +import kotlinx.android.synthetic.main.fragment_tickets.view.cancelDiscountCode +import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeAppliedLayout +import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeEditText +import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeLayout import kotlinx.android.synthetic.main.fragment_tickets.view.eventName import kotlinx.android.synthetic.main.fragment_tickets.view.organizerName import kotlinx.android.synthetic.main.fragment_tickets.view.register import kotlinx.android.synthetic.main.fragment_tickets.view.ticketInfoTextView import kotlinx.android.synthetic.main.fragment_tickets.view.ticketTableHeader +import kotlinx.android.synthetic.main.fragment_tickets.view.ticketsCoordinatorLayout import kotlinx.android.synthetic.main.fragment_tickets.view.ticketsRecycler import kotlinx.android.synthetic.main.fragment_tickets.view.time -import kotlinx.android.synthetic.main.fragment_tickets.view.ticketsCoordinatorLayout -import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeEditText -import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeLayout -import kotlinx.android.synthetic.main.fragment_tickets.view.discountCodeAppliedLayout -import kotlinx.android.synthetic.main.fragment_tickets.view.cancelDiscountCode -import kotlinx.android.synthetic.main.fragment_tickets.view.applyDiscountCode -import kotlinx.android.synthetic.main.fragment_tickets.view.applyButton import org.fossasia.openevent.general.R import org.fossasia.openevent.general.event.Event import org.fossasia.openevent.general.event.EventUtils +import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard import org.fossasia.openevent.general.utils.Utils.progressDialog +import org.fossasia.openevent.general.utils.Utils.setToolbar import org.fossasia.openevent.general.utils.Utils.show -import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard import org.fossasia.openevent.general.utils.extensions.nonNull -import org.koin.androidx.viewmodel.ext.android.viewModel -import org.fossasia.openevent.general.utils.Utils.setToolbar import org.jetbrains.anko.design.longSnackbar -import java.util.Currency -import kotlin.collections.ArrayList +import org.koin.androidx.viewmodel.ext.android.viewModel const val TICKETS_FRAGMENT = "ticketsFragment" const val APPLY_DISCOUNT_CODE = 1 diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsRecyclerAdapter.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsRecyclerAdapter.kt index b77d7ddfbd..4a42a8ffe5 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsRecyclerAdapter.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsRecyclerAdapter.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.ticket -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup +import androidx.recyclerview.widget.RecyclerView import org.fossasia.openevent.general.R import org.fossasia.openevent.general.discount.DiscountCode import org.fossasia.openevent.general.event.tax.Tax diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt index 9ae43512e9..049c0f0578 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt @@ -5,7 +5,6 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import io.reactivex.disposables.CompositeDisposable import io.reactivex.rxkotlin.plusAssign -import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import org.fossasia.openevent.general.R import org.fossasia.openevent.general.auth.AuthHolder import org.fossasia.openevent.general.common.SingleLiveEvent @@ -17,6 +16,7 @@ import org.fossasia.openevent.general.event.EventService import org.fossasia.openevent.general.event.tax.Tax import org.fossasia.openevent.general.event.tax.TaxService import org.fossasia.openevent.general.utils.HttpErrors +import org.fossasia.openevent.general.utils.extensions.withDefaultSchedulers import retrofit2.HttpException import timber.log.Timber diff --git a/app/src/main/java/org/fossasia/openevent/general/utils/DateTimeUtils.kt b/app/src/main/java/org/fossasia/openevent/general/utils/DateTimeUtils.kt index 2f5714c448..1365d657f4 100644 --- a/app/src/main/java/org/fossasia/openevent/general/utils/DateTimeUtils.kt +++ b/app/src/main/java/org/fossasia/openevent/general/utils/DateTimeUtils.kt @@ -1,7 +1,7 @@ package org.fossasia.openevent.general.utils -import org.fossasia.openevent.general.event.EventUtils import java.util.Calendar +import org.fossasia.openevent.general.event.EventUtils object DateTimeUtils { fun getNextDate(): String { diff --git a/app/src/main/java/org/fossasia/openevent/general/utils/ErrorUtils.kt b/app/src/main/java/org/fossasia/openevent/general/utils/ErrorUtils.kt index b946ee8693..c49d090056 100644 --- a/app/src/main/java/org/fossasia/openevent/general/utils/ErrorUtils.kt +++ b/app/src/main/java/org/fossasia/openevent/general/utils/ErrorUtils.kt @@ -1,7 +1,5 @@ package org.fossasia.openevent.general.utils -import timber.log.Timber -import org.json.JSONObject import org.fossasia.openevent.general.utils.HttpErrors.BAD_REQUEST import org.fossasia.openevent.general.utils.HttpErrors.CONFLICT import org.fossasia.openevent.general.utils.HttpErrors.FORBIDDEN @@ -11,7 +9,9 @@ import org.fossasia.openevent.general.utils.HttpErrors.REQUEST_TIMEOUT import org.fossasia.openevent.general.utils.HttpErrors.UNAUTHORIZED import org.fossasia.openevent.general.utils.HttpErrors.UNPROCESSABLE_ENTITY import org.fossasia.openevent.general.utils.StringUtils.isEmpty +import org.json.JSONObject import retrofit2.HttpException +import timber.log.Timber const val ERRORS = "errors" const val SOURCE = "source" diff --git a/app/src/main/java/org/fossasia/openevent/general/utils/StringUtils.kt b/app/src/main/java/org/fossasia/openevent/general/utils/StringUtils.kt index b7d5d5643d..67dca44089 100644 --- a/app/src/main/java/org/fossasia/openevent/general/utils/StringUtils.kt +++ b/app/src/main/java/org/fossasia/openevent/general/utils/StringUtils.kt @@ -2,14 +2,14 @@ package org.fossasia.openevent.general.utils import android.content.Context import android.content.res.Resources +import android.text.Editable import android.text.Html +import android.text.InputType import android.text.Spannable import android.text.SpannableStringBuilder import android.text.TextPaint -import android.text.style.ClickableSpan import android.text.TextWatcher -import android.text.Editable -import android.text.InputType +import android.text.style.ClickableSpan import android.util.Patterns import android.view.View import com.google.android.material.textfield.TextInputEditText diff --git a/app/src/main/java/org/fossasia/openevent/general/utils/Utils.kt b/app/src/main/java/org/fossasia/openevent/general/utils/Utils.kt index 9cdf2b6975..386d92b2a7 100644 --- a/app/src/main/java/org/fossasia/openevent/general/utils/Utils.kt +++ b/app/src/main/java/org/fossasia/openevent/general/utils/Utils.kt @@ -23,8 +23,8 @@ import androidx.browser.customtabs.CustomTabsIntent import androidx.core.content.ContextCompat import androidx.core.graphics.ColorUtils import com.google.android.material.bottomnavigation.BottomNavigationView -import org.fossasia.openevent.general.R import java.util.regex.Pattern +import org.fossasia.openevent.general.R object Utils { diff --git a/app/src/main/java/org/fossasia/openevent/general/utils/extensions/FragmentExt.kt b/app/src/main/java/org/fossasia/openevent/general/utils/extensions/FragmentExt.kt index ff5e50bde5..5a412c423d 100644 --- a/app/src/main/java/org/fossasia/openevent/general/utils/extensions/FragmentExt.kt +++ b/app/src/main/java/org/fossasia/openevent/general/utils/extensions/FragmentExt.kt @@ -1,8 +1,8 @@ package org.fossasia.openevent.general.utils.extensions import android.os.Build -import androidx.transition.TransitionInflater import androidx.fragment.app.Fragment +import androidx.transition.TransitionInflater const val SUPPORTED_TRANSITION_VERSION = Build.VERSION_CODES.O diff --git a/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt index 4daabcc4f5..387eaba812 100644 --- a/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt @@ -13,9 +13,9 @@ import androidx.fragment.app.Fragment import androidx.lifecycle.Observer import androidx.navigation.Navigation import com.google.android.material.snackbar.Snackbar -import kotlinx.android.synthetic.main.fragment_welcome.view.pickCityButton import kotlinx.android.synthetic.main.fragment_welcome.view.currentLocation import kotlinx.android.synthetic.main.fragment_welcome.view.locationProgressBar +import kotlinx.android.synthetic.main.fragment_welcome.view.pickCityButton import kotlinx.android.synthetic.main.fragment_welcome.view.skip import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Preference diff --git a/app/src/playStore/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt b/app/src/playStore/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt index e444f2575b..96bc7250ca 100644 --- a/app/src/playStore/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt +++ b/app/src/playStore/java/org/fossasia/openevent/general/search/location/LocationServiceImpl.kt @@ -8,15 +8,15 @@ import com.google.android.gms.location.LocationRequest import com.google.android.gms.location.LocationResult import com.google.android.gms.location.LocationServices import io.reactivex.Single +import java.io.IOException +import java.lang.Exception +import java.util.Locale import org.fossasia.openevent.general.R import org.fossasia.openevent.general.data.Resource import org.fossasia.openevent.general.location.LocationPermissionException import org.fossasia.openevent.general.location.NoLocationSourceException import org.fossasia.openevent.general.utils.nullToEmpty import timber.log.Timber -import java.io.IOException -import java.lang.Exception -import java.util.Locale class LocationServiceImpl( private val context: Context, diff --git a/app/src/test/java/org/fossasia/openevent/general/AppLinkUtilsTest.kt b/app/src/test/java/org/fossasia/openevent/general/AppLinkUtilsTest.kt index 385e2ae2c6..1146fb2952 100644 --- a/app/src/test/java/org/fossasia/openevent/general/AppLinkUtilsTest.kt +++ b/app/src/test/java/org/fossasia/openevent/general/AppLinkUtilsTest.kt @@ -1,12 +1,12 @@ package org.fossasia.openevent.general +import org.fossasia.openevent.general.utils.AppLinkData +import org.fossasia.openevent.general.utils.AppLinkUtils import org.fossasia.openevent.general.utils.EVENT_IDENTIFIER import org.fossasia.openevent.general.utils.RESET_PASSWORD_TOKEN -import org.fossasia.openevent.general.utils.AppLinkUtils import org.fossasia.openevent.general.utils.VERIFICATION_TOKEN -import org.fossasia.openevent.general.utils.AppLinkData -import org.junit.Test import org.junit.Assert.assertEquals +import org.junit.Test class AppLinkUtilsTest { diff --git a/app/src/test/java/org/fossasia/openevent/general/event/EventUtilsTest.kt b/app/src/test/java/org/fossasia/openevent/general/event/EventUtilsTest.kt index adbf8d32a2..ca0b22a780 100644 --- a/app/src/test/java/org/fossasia/openevent/general/event/EventUtilsTest.kt +++ b/app/src/test/java/org/fossasia/openevent/general/event/EventUtilsTest.kt @@ -1,12 +1,12 @@ package org.fossasia.openevent.general.event +import java.time.ZoneId +import java.util.TimeZone import org.junit.After import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test import org.threeten.bp.ZonedDateTime -import java.time.ZoneId -import java.util.TimeZone class EventUtilsTest { From d9f56511d6c2c6cd060c0a036b6711e6a845c87c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2019 10:31:21 +0530 Subject: [PATCH 10/54] chore(deps): bump stripe-android from 11.2.0 to 11.2.2 (#2389) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 11.2.0 to 11.2.2. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v11.2.0...v11.2.2) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9575542f86..d3234f6e64 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:11.2.0' + implementation 'com.stripe:stripe-android:11.2.2' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From a3e57b692b1aa0d772884ab1de97ebe9ddcdbd18 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Sat, 12 Oct 2019 17:37:00 +0100 Subject: [PATCH 11/54] chore: dry run on dev to master merge pr (#2377) --- scripts/update-apk.sh | 53 ++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/scripts/update-apk.sh b/scripts/update-apk.sh index bc330c61e7..c22ca25e39 100644 --- a/scripts/update-apk.sh +++ b/scripts/update-apk.sh @@ -4,10 +4,16 @@ set -e git config --global user.name "Travis CI" git config --global user.email "noreply+travis@fossasia.org" -export DEPLOY_BRANCH=${DEPLOY_BRANCH:-development} -export PUBLISH_BRANCH=${PUBLISH_BRANCH:-master} +[[ $TRAVIS_BRANCH =~ ^(master)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_PUBLISH_BRANCH=true || IS_PUBLISH_BRANCH=false +[[ $TRAVIS_BRANCH =~ ^(development)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_DEV_BRANCH=true || IS_DEV_BRANCH=false +[[ $TRAVIS_PULL_REQUEST =~ ^(false)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ && $TRAVIS_BRANCH =~ ^(development|master)$ ]] && DEV_OR_MASTER_BUILD=true || DEV_OR_MASTER_BUILD=false +[[ $IS_PUBLISH_BRANCH && $TRAVIS_PULL_REQUEST_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && PR_FOR_RELEASE=true || PR_FOR_RELEASE=false -if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "fossasia/open-event-attendee-android" ] || ! [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" -o "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]; then +if $PR_FOR_RELEASE; then + FASTLANE_DRY_RUN="--validate_only true" +fi + +if ! ( $DEV_OR_MASTER_BUILD || $PR_FOR_RELEASE ); then echo "We upload apk only for changes in development or master, and not PRs. So, let's skip this shall we ? :)" exit 0 fi @@ -17,10 +23,12 @@ fi git clone --quiet --branch=apk https://fossasia:$GITHUB_API_KEY@github.com/fossasia/open-event-attendee-android apk > /dev/null cd apk -if [ "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]; then - /bin/rm -f * -else - /bin/rm -f open-event-attendee-dev-* +if ! $PR_FOR_RELEASE; then + if $IS_DEV_BRANCH; then + /bin/rm -f open-event-attendee-dev-* + else + /bin/rm -f * + fi fi find ../app/build/outputs -type f -name '*.apk' -exec cp -v {} . \; @@ -28,23 +36,32 @@ find ../app/build/outputs -type f -name '*.aab' -exec cp -v {} . \; for file in app*; do - if [ "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]; then + if $IS_DEV_BRANCH; then if [[ ${file} =~ ".aab" ]]; then - mv $file eventyay-attendee-master-${file} + mv $file eventyay-attendee-dev-${file} else - mv $file eventyay-attendee-master-${file:4} + mv $file eventyay-attendee-dev-${file:4} fi - elif [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" ]; then + else if [[ ${file} =~ ".aab" ]]; then - mv $file eventyay-attendee-dev-${file} + mv $file eventyay-attendee-master-${file} else - mv $file eventyay-attendee-dev-${file:4} + mv $file eventyay-attendee-master-${file:4} fi fi done +if $IS_PUBLISH_BRANCH ;then + cd .. + gem install fastlane + fastlane supply --aab ./apk/eventyay-attendee-master-app-playStore-release.aab --skip_upload_apk true --track alpha --json_key ./scripts/fastlane.json --package_name $PACKAGE_NAME $FASTLANE_DRY_RUN + if $PR_FOR_RELEASE ;then + exit 0 + fi +fi + # Create a new branch that will contains only latest apk git checkout --orphan temporary @@ -59,13 +76,3 @@ git branch -m apk # Force push to origin since histories are unrelated git push origin apk --force --quiet > /dev/null - -# Publish App to Play Store -if [ "$TRAVIS_BRANCH" != "$PUBLISH_BRANCH" ]; then - echo "We publish apk only for changes in master branch. So, let's skip this shall we ? :)" - exit 0 -fi - -cd .. -gem install fastlane -fastlane supply --aab ./apk/eventyay-attendee-master-app-playStore-release.aab --skip_upload_apk true --track alpha --json_key ./scripts/fastlane.json --package_name $PACKAGE_NAME From 14a654b0e9a70b7408d05e801766d13503e213a4 Mon Sep 17 00:00:00 2001 From: prudhvi reddy Date: Wed, 16 Oct 2019 17:32:57 +0530 Subject: [PATCH 12/54] chore: update travis ci badges (#2394) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 013d15b805..37bd897522 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Open Event Attendee App -[![Build Status](https://travis-ci.org/fossasia/open-event-attendee-android.svg?branch=development)](https://travis-ci.org/fossasia/open-event-attendee-android?branch=development) -[![Build Status](https://travis-ci.org/fossasia/open-event-attendee-android.svg?branch=master)](https://travis-ci.org/fossasia/open-event-attendee-android?branch=master) +[![Build Status](https://img.shields.io/travis/fossasia/open-event-attendee-android/development.svg?label=development)](https://travis-ci.org/fossasia/open-event-attendee-android?branch=development) +[![Build Status](https://img.shields.io/travis/fossasia/open-event-attendee-android/master.svg?label=master)](https://travis-ci.org/fossasia/open-event-attendee-android?branch=master) [![Join the chat at https://gitter.im/fossasia/open-event-android](https://badges.gitter.im/fossasia/open-event-android.svg)](https://gitter.im/fossasia/open-event-android?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Mailing List](https://img.shields.io/badge/Mailing%20List-FOSSASIA-blue.svg)](https://groups.google.com/forum/#!forum/open-event) [![Twitter Follow](https://img.shields.io/twitter/follow/eventyay.svg?style=social&label=Follow&maxAge=2592000?style=flat-square)](https://twitter.com/eventyay) From 1bc9a3a9b9a76c6e2a00d472c4394927e96bb22a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2019 12:23:31 +0530 Subject: [PATCH 13/54] chore(deps): bump stripe-android from 11.2.2 to 12.0.0 (#2397) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 11.2.2 to 12.0.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v11.2.2...v12.0.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index d3234f6e64..9981857c46 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:11.2.2' + implementation 'com.stripe:stripe-android:12.0.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From 3977c7f5105d29990420bdfa788a920eae9c247d Mon Sep 17 00:00:00 2001 From: Shubham Pathak Date: Thu, 17 Oct 2019 14:47:06 +0530 Subject: [PATCH 14/54] fix: Similar events collapsing (#2391) * fix: Resolve similar events collapsing issue #2390 * Remove non assertion operator * Resolve indentation error --- .../openevent/general/event/EventDetailsFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt index ea5f2227e5..aca89d3a2f 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt @@ -103,6 +103,7 @@ class EventDetailsFragment : Fragment() { private val sessionsAdapter = SessionRecyclerAdapter() private val socialLinkAdapter = SocialLinksRecyclerAdapter() private val similarEventsAdapter = SimilarEventsListAdapter() + private var hasSimilarEvents: Boolean = false private lateinit var rootView: View private lateinit var binding: FragmentEventBinding @@ -383,7 +384,10 @@ class EventDetailsFragment : Fragment() { rootView.similarEventsContainer.isVisible = true } else { rootView.shimmerSimilarEvents.stopShimmer() - rootView.similarEventsContainer.isVisible = similarEventsAdapter.currentList?.isEmpty() ?: true + if (!similarEventsAdapter.currentList.isNullOrEmpty()) { + hasSimilarEvents = true + } + rootView.similarEventsContainer.isVisible = hasSimilarEvents } }) From 215557a7f7bfc0d03f554165ec04383d6c58b163 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2019 03:48:02 +0530 Subject: [PATCH 15/54] chore(deps): bump stripe-android from 12.0.0 to 12.0.1 (#2399) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.0.0 to 12.0.1. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.0.0...v12.0.1) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9981857c46..0eb37ace25 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.0.0' + implementation 'com.stripe:stripe-android:12.0.1' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From e29942311b2ee3c124d697b431eac9b945287f0d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2019 11:07:03 +0530 Subject: [PATCH 16/54] chore(deps): bump stripe-android from 12.0.1 to 12.1.0 (#2401) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.0.1 to 12.1.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.0.1...v12.1.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 0eb37ace25..6060969987 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.0.1' + implementation 'com.stripe:stripe-android:12.1.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From 033e9dd3370055fdb937bbccc519233b2f0b88c0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 03:02:00 +0530 Subject: [PATCH 17/54] chore(deps): bump constraintlayout from 2.0.0-beta2 to 2.0.0-beta3 (#2402) Bumps constraintlayout from 2.0.0-beta2 to 2.0.0-beta3. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 6060969987..f92ed9ad41 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -136,7 +136,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05' implementation 'com.google.android.material:material:1.1.0-beta01' From 6d83ab0bec2e86770879843c13f290ba9882c713 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 10:27:01 +0530 Subject: [PATCH 18/54] chore(deps): bump roomVersion from 2.2.0 to 2.2.1 (#2403) Bumps `roomVersion` from 2.2.0 to 2.2.1. Updates `room-runtime` from 2.2.0 to 2.2.1 Updates `room-rxjava2` from 2.2.0 to 2.2.1 Updates `room-compiler` from 2.2.0 to 2.2.1 Updates `room-testing` from 2.2.0 to 2.2.1 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f92ed9ad41..375b513a45 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -126,7 +126,7 @@ repositories { dependencies { def lifecycle_version = "2.2.0-beta01" def koin_version = "2.0.1" - def roomVersion = "2.2.0" + def roomVersion = "2.2.1" def ktx_version = "1.1.0" def ktx2_version = "2.1.0" def nav_version = "2.1.0" From 08adbba5cf548b035692fdc44b7fb643ae490cd6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2019 10:27:12 +0530 Subject: [PATCH 19/54] chore(deps): bump recyclerview from 1.1.0-beta05 to 1.1.0-rc01 (#2404) Bumps recyclerview from 1.1.0-beta05 to 1.1.0-rc01. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 375b513a45..5a8dae3fdd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -138,7 +138,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05' + implementation 'androidx.recyclerview:recyclerview:1.1.0-rc01' implementation 'com.google.android.material:material:1.1.0-beta01' implementation "androidx.browser:browser:1.0.0" implementation 'androidx.exifinterface:exifinterface:1.0.0' From 989c8f1854bcfe4526a37b368c4fdc14c3e9407b Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Fri, 25 Oct 2019 18:13:50 +0100 Subject: [PATCH 20/54] chore(deps): bump lifecycle_version from 2.2.0-beta01 to 2.2.0-rc01 (#2406) --- app/build.gradle | 2 +- .../openevent/general/attendees/AttendeeFragment.kt | 2 +- .../org/fossasia/openevent/general/auth/AuthFragment.kt | 2 +- .../openevent/general/event/EventDetailsFragment.kt | 4 ++-- .../org/fossasia/openevent/general/event/EventsFragment.kt | 2 +- .../openevent/general/order/ExpiredOrderFragment.kt | 2 +- .../openevent/general/order/OrdersUnderUserFragment.kt | 2 +- .../openevent/general/search/SearchResultsFragment.kt | 6 +++--- .../general/search/location/SearchLocationFragment.kt | 2 +- .../openevent/general/search/type/SearchTypeFragment.kt | 4 ++-- .../fossasia/openevent/general/ticket/TicketsFragment.kt | 4 ++-- .../fossasia/openevent/general/welcome/WelcomeFragment.kt | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5a8dae3fdd..3f59ff0e91 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -124,7 +124,7 @@ repositories { } dependencies { - def lifecycle_version = "2.2.0-beta01" + def lifecycle_version = "2.2.0-rc01" def koin_version = "2.0.1" def roomVersion = "2.2.1" def ktx_version = "1.1.0" diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt index 579fbef6e0..bd5a83e267 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt @@ -849,7 +849,7 @@ class AttendeeFragment : Fragment(), ComplexBackPressFragment { attendeeViewModel.ticketSoldOut .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { showTicketSoldOutDialog(it) }) diff --git a/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt b/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt index 47aaa3ab27..e6d15a14b9 100644 --- a/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/auth/AuthFragment.kt @@ -54,7 +54,7 @@ class AuthFragment : Fragment(), ComplexBackPressFragment { smartAuthViewModel.requestCredentials(SmartAuthUtil.getCredentialsClient(requireActivity())) smartAuthViewModel.isCredentialStored .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { if (it) redirectToLogin() }) } diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt index aca89d3a2f..ab99a6bc4b 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt @@ -193,7 +193,7 @@ class EventDetailsFragment : Fragment() { private fun setupEventOverview() { eventViewModel.event .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { currentEvent = it loadEvent(it) if (eventViewModel.similarEvents.value == null) { @@ -483,7 +483,7 @@ class EventDetailsFragment : Fragment() { super.onViewCreated(view, savedInstanceState) eventViewModel.connection .nonNull() - .observe(this, Observer { isConnected -> + .observe(viewLifecycleOwner, Observer { isConnected -> if (isConnected) { val currentFeedback = eventViewModel.eventFeedback.value if (currentFeedback == null) { diff --git a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt index a662079ca1..8062ea3e37 100644 --- a/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/event/EventsFragment.kt @@ -116,7 +116,7 @@ class EventsFragment : Fragment(), BottomIconDoubleClick { eventsViewModel.pagedEvents .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> eventsListAdapter.submitList(list) }) diff --git a/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt index ffdf3bab0e..2886a5f170 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/ExpiredOrderFragment.kt @@ -51,7 +51,7 @@ class ExpiredOrderFragment : Fragment() { ordersUnderUserVM.showShimmerResults .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { rootView.shimmerSearch.isVisible = it if (it) { rootView.shimmerSearch.startShimmer() diff --git a/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt b/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt index ec375360d5..c689b68373 100644 --- a/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/order/OrdersUnderUserFragment.kt @@ -95,7 +95,7 @@ class OrdersUnderUserFragment : Fragment(), BottomIconDoubleClick { ordersUnderUserVM.showShimmerResults .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { if (it) { rootView.shimmerSearch.startShimmer() showNoTicketsScreen(false) diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt index ab3de30bff..0a733699ea 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt @@ -78,7 +78,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener searchResultsViewModel.loadEventTypes() searchResultsViewModel.eventTypes .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> eventTypesList = list }) } @@ -102,7 +102,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener searchResultsViewModel.pagedEvents .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> searchPagedListAdapter.submitList(list) Timber.d("Fetched events of size %s", searchPagedListAdapter.itemCount) }) @@ -172,7 +172,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener addChips(date, true) searchResultsViewModel.eventTypes .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> list.forEach { addChips(it.name, false) } diff --git a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt index 32ea329325..bf0d78b756 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/location/SearchLocationFragment.kt @@ -258,7 +258,7 @@ class SearchLocationFragment : Fragment() { searchLocationViewModel.eventLocations .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> popularLocationAdapter.addAll(list.map { it.name }) rootView.popularLocationsLayout.isVisible = list.isNotEmpty() }) diff --git a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt index f306ccbbb2..991371c989 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/type/SearchTypeFragment.kt @@ -45,7 +45,7 @@ class SearchTypeFragment : Fragment() { searchTypeViewModel.connection .nonNull() - .observe(this, Observer { isConnected -> + .observe(viewLifecycleOwner, Observer { isConnected -> if (isConnected) { searchTypeViewModel.loadEventTypes() showNoInternetError(false) @@ -67,7 +67,7 @@ class SearchTypeFragment : Fragment() { searchTypeViewModel.eventTypes .nonNull() - .observe(this, Observer { list -> + .observe(viewLifecycleOwner, Observer { list -> list.forEach { eventTypesList.add(it.name) } diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt index e6d53cd724..c57fae4f60 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsFragment.kt @@ -110,13 +110,13 @@ class TicketsFragment : Fragment() { ticketsViewModel.event .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { loadEventDetails(it) }) ticketsViewModel.tickets .nonNull() - .observe(this, Observer { + .observe(viewLifecycleOwner, Observer { ticketsRecyclerAdapter.addAll(it) ticketsRecyclerAdapter.notifyDataSetChanged() }) diff --git a/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt index 387eaba812..339b4a5dc4 100644 --- a/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/welcome/WelcomeFragment.kt @@ -53,12 +53,12 @@ class WelcomeFragment : Fragment() { redirectToAuth() } - geoLocationViewModel.location.observe(this, Observer { + geoLocationViewModel.location.observe(viewLifecycleOwner, Observer { preference.putString(SAVED_LOCATION, it) redirectToAuth() }) - geoLocationViewModel.errorMessage.observe(this, Observer { message -> + geoLocationViewModel.errorMessage.observe(viewLifecycleOwner, Observer { message -> rootView.locationProgressBar.isVisible = false Snackbar.make(rootView, message, Snackbar.LENGTH_SHORT).show() }) From b55e28b5f2df12d4442541c5c792b47d5fb5913d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2019 09:00:52 +0530 Subject: [PATCH 21/54] chore(deps): bump stripe-android from 12.1.0 to 12.2.0 (#2408) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.1.0 to 12.2.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.1.0...v12.2.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 3f59ff0e91..25e200df04 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.1.0' + implementation 'com.stripe:stripe-android:12.2.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From 7e26bbc3fc73c3f6c6b54f764a725414ed01ed9c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2019 21:12:36 +0000 Subject: [PATCH 22/54] chore(deps): bump gradle from 3.5.1 to 3.5.2 Bumps gradle from 3.5.1 to 3.5.2. Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5c098373c7..fbc843204c 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.1' + classpath 'com.android.tools.build:gradle:3.5.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0' classpath "gradle.plugin.com.github.b3er.local.properties:local-properties-plugin:1.1" From 57927e3fcca2a39b44e2e1944023ef3e8ab241ad Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2019 03:45:22 +0530 Subject: [PATCH 23/54] chore(deps): bump rxjava from 2.2.13 to 2.2.14 (#2410) Bumps [rxjava](https://github.com/ReactiveX/RxJava) from 2.2.13 to 2.2.14. - [Release notes](https://github.com/ReactiveX/RxJava/releases) - [Changelog](https://github.com/ReactiveX/RxJava/blob/v2.2.14/CHANGES.md) - [Commits](https://github.com/ReactiveX/RxJava/compare/v2.2.13...v2.2.14) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 25e200df04..de8e0cc1ba 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -185,7 +185,7 @@ dependencies { // RxJava implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0' - implementation 'io.reactivex.rxjava2:rxjava:2.2.13' + implementation 'io.reactivex.rxjava2:rxjava:2.2.14' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2' // Picasso From 4dddb78a393f8df7d0df8922db0917856afd0fed Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Thu, 7 Nov 2019 18:26:10 +0000 Subject: [PATCH 24/54] chore: improve bash script for release (#2396) --- scripts/prep-key.sh | 13 ++++++++++--- scripts/update-apk.sh | 19 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/scripts/prep-key.sh b/scripts/prep-key.sh index 3a19dd71a1..0ebd1fa445 100644 --- a/scripts/prep-key.sh +++ b/scripts/prep-key.sh @@ -1,10 +1,17 @@ #!/bin/sh set -e -export DEPLOY_BRANCH=${DEPLOY_BRANCH:-development} -export PUBLISH_BRANCH=${PUBLISH_BRANCH:-master} +[[ $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_FOSS_SLUG=true || IS_FOSS_SLUG=false +[[ $TRAVIS_PULL_REQUEST_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_FOSS_PR=true || IS_FOSS_PR=false +[[ $TRAVIS_BRANCH =~ ^(development|master)$ && $IS_FOSS_SLUG ]] && BRANCH_DEPLOYORDEV=true || BRANCH_DEPLOYORDEV=false -if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_REPO_SLUG" != "fossasia/open-event-attendee-android" ] || ! [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" -o "$TRAVIS_BRANCH" == "$PUBLISH_BRANCH" ]; then +[[ $TRAVIS_BRANCH =~ ^(master)$ && $IS_FOSS_SLUG ]] && IS_PUBLISH_BRANCH=true || IS_PUBLISH_BRANCH=false + +[[ $TRAVIS_PULL_REQUEST =~ ^(false)$ && $BRANCH_DEPLOYORDEV ]] && export DEV_OR_MASTER_BUILD=${DEV_OR_MASTER_BUILD:-true} || export DEV_OR_MASTER_BUILD=${DEV_OR_MASTER_BUILD:-false} + +[[ $IS_PUBLISH_BRANCH && $IS_FOSS_PR =~ ^(true)$ ]] && export PR_FOR_RELEASE=${PR_FOR_RELEASE:-true} || export PR_FOR_RELEASE=${PR_FOR_RELEASE:-false} + +if ! ( $DEV_OR_MASTER_BUILD || $PR_FOR_RELEASE ); then echo "We decrypt key only for pushes to the master branch and not PRs. So, skip." exit 0 fi diff --git a/scripts/update-apk.sh b/scripts/update-apk.sh index c22ca25e39..2b05746fab 100644 --- a/scripts/update-apk.sh +++ b/scripts/update-apk.sh @@ -4,10 +4,16 @@ set -e git config --global user.name "Travis CI" git config --global user.email "noreply+travis@fossasia.org" -[[ $TRAVIS_BRANCH =~ ^(master)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_PUBLISH_BRANCH=true || IS_PUBLISH_BRANCH=false -[[ $TRAVIS_BRANCH =~ ^(development)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_DEV_BRANCH=true || IS_DEV_BRANCH=false -[[ $TRAVIS_PULL_REQUEST =~ ^(false)$ && $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ && $TRAVIS_BRANCH =~ ^(development|master)$ ]] && DEV_OR_MASTER_BUILD=true || DEV_OR_MASTER_BUILD=false -[[ $IS_PUBLISH_BRANCH && $TRAVIS_PULL_REQUEST_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && PR_FOR_RELEASE=true || PR_FOR_RELEASE=false +[[ $TRAVIS_REPO_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_FOSS_SLUG=true || IS_FOSS_SLUG=false +[[ $TRAVIS_PULL_REQUEST_SLUG =~ ^(fossasia/open-event-attendee-android)$ ]] && IS_FOSS_PR=true || IS_FOSS_PR=false +[[ $TRAVIS_BRANCH =~ ^(development|master)$ && $IS_FOSS_SLUG ]] && BRANCH_DEPLOYORDEV=true || BRANCH_DEPLOYORDEV=false + +[[ $TRAVIS_BRANCH =~ ^(master)$ && $IS_FOSS_SLUG ]] && IS_PUBLISH_BRANCH=true || IS_PUBLISH_BRANCH=false +[[ $TRAVIS_BRANCH =~ ^(development)$ && $IS_FOSS_SLUG ]] && IS_DEV_BRANCH=true || IS_DEV_BRANCH=false + +[[ $TRAVIS_PULL_REQUEST =~ ^(false)$ && $BRANCH_DEPLOYORDEV ]] && export DEV_OR_MASTER_BUILD=${DEV_OR_MASTER_BUILD:-true} || export DEV_OR_MASTER_BUILD=${DEV_OR_MASTER_BUILD:-false} + +[[ $IS_PUBLISH_BRANCH && $IS_FOSS_PR =~ ^(true)$ ]] && export PR_FOR_RELEASE=${PR_FOR_RELEASE:-true} || export PR_FOR_RELEASE=${PR_FOR_RELEASE:-false} if $PR_FOR_RELEASE; then FASTLANE_DRY_RUN="--validate_only true" @@ -15,7 +21,7 @@ fi if ! ( $DEV_OR_MASTER_BUILD || $PR_FOR_RELEASE ); then echo "We upload apk only for changes in development or master, and not PRs. So, let's skip this shall we ? :)" - exit 0 + exit 0 fi ./gradlew bundlePlayStoreRelease @@ -57,6 +63,9 @@ if $IS_PUBLISH_BRANCH ;then cd .. gem install fastlane fastlane supply --aab ./apk/eventyay-attendee-master-app-playStore-release.aab --skip_upload_apk true --track alpha --json_key ./scripts/fastlane.json --package_name $PACKAGE_NAME $FASTLANE_DRY_RUN + if [ $? -ne 0 ]; then + exit 1 + fi if $PR_FOR_RELEASE ;then exit 0 fi From f41da6e2e04926c040a68d656670e22e9ca3119c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2019 09:30:38 +0530 Subject: [PATCH 25/54] chore(deps): bump lifecycle_version from 2.2.0-rc01 to 2.2.0-rc02 (#2414) Bumps `lifecycle_version` from 2.2.0-rc01 to 2.2.0-rc02. Updates `lifecycle-extensions` from 2.2.0-rc01 to 2.2.0-rc02 Updates `lifecycle-common-java8` from 2.2.0-rc01 to 2.2.0-rc02 Updates `lifecycle-reactivestreams` from 2.2.0-rc01 to 2.2.0-rc02 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index de8e0cc1ba..9a2dada6aa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -124,7 +124,7 @@ repositories { } dependencies { - def lifecycle_version = "2.2.0-rc01" + def lifecycle_version = "2.2.0-rc02" def koin_version = "2.0.1" def roomVersion = "2.2.1" def ktx_version = "1.1.0" From 99d61f40bab989c6e8de5770861c093cd710e7ea Mon Sep 17 00:00:00 2001 From: Suneet Srivastava Date: Sun, 10 Nov 2019 13:16:36 +0530 Subject: [PATCH 26/54] fix: app crash on search results fragment (#2418) --- .../fossasia/openevent/general/search/SearchResultsFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt index 0a733699ea..1e26e0251c 100644 --- a/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt @@ -78,7 +78,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener searchResultsViewModel.loadEventTypes() searchResultsViewModel.eventTypes .nonNull() - .observe(viewLifecycleOwner, Observer { list -> + .observe(this, Observer { list -> eventTypesList = list }) } From 88eb3a88bb7aabdcebc65af54173ddaa2a1c94cf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2019 12:02:28 +0530 Subject: [PATCH 27/54] chore(deps): bump jackson-module-kotlin from 2.9.6 to 2.10.1 (#2421) Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.9.6 to 2.10.1. - [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases) - [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.9.6...jackson-module-kotlin-2.10.1) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9a2dada6aa..90ee14a86c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -173,7 +173,7 @@ dependencies { implementation 'com.jakewharton.timber:timber:4.7.1' implementation 'com.jakewharton.threetenabp:threetenabp:1.2.1' - implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6" + implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.1" implementation 'com.github.jasminb:jsonapi-converter:0.9' implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2' implementation 'com.squareup.retrofit2:retrofit:2.6.2' From 07704cc1c775bb6d4c2a2c13456b0cfd78745e43 Mon Sep 17 00:00:00 2001 From: Robin Singh Date: Tue, 12 Nov 2019 13:57:36 +0530 Subject: [PATCH 28/54] chore(deps): bump stripe-android from 12.2.0 to 12.3.0 (#2422) --- app/build.gradle | 2 +- .../fossasia/openevent/general/attendees/AttendeeFragment.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 90ee14a86c..515767ccb7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.2.0' + implementation 'com.stripe:stripe-android:12.3.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' diff --git a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt index bd5a83e267..57d58a18df 100644 --- a/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt +++ b/app/src/main/java/org/fossasia/openevent/general/attendees/AttendeeFragment.kt @@ -872,11 +872,12 @@ class AttendeeFragment : Fragment(), ComplexBackPressFragment { private fun sendToken(card: Card) { Stripe(requireContext(), BuildConfig.STRIPE_API_KEY) - .createToken(card, object : ApiResultCallback { + .createCardToken(card = card, callback = object : ApiResultCallback { override fun onSuccess(token: Token) { val charge = Charge(attendeeViewModel.getId().toInt(), token.id, null) attendeeViewModel.chargeOrder(charge) } + override fun onError(error: Exception) { rootView.snackbar(error.localizedMessage.toString()) } From fcac7c413c2790723da4a772810f6434b56f0890 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2019 03:13:15 +0530 Subject: [PATCH 29/54] chore(deps): bump stripe-android from 12.3.0 to 12.4.0 (#2425) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.3.0 to 12.4.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.3.0...v12.4.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 515767ccb7..5f1bf4b876 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,7 +192,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.3.0' + implementation 'com.stripe:stripe-android:12.4.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From a149a70b49f86b09397adcc5330363479a91773e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 05:29:51 +0530 Subject: [PATCH 30/54] chore(deps): bump kotlin_version from 1.3.50 to 1.3.60 (#2428) Bumps `kotlin_version` from 1.3.50 to 1.3.60. Updates `kotlin-gradle-plugin` from 1.3.50 to 1.3.60 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk7` from 1.3.50 to 1.3.60 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fbc843204c..51527383d9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.3.60' repositories { google() From 55f32dbaf6f0c451abe0f93e22d733e78a9790aa Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Fri, 15 Nov 2019 00:23:36 +0000 Subject: [PATCH 31/54] =?UTF-8?q?chore(deps):=20bump=20com.diffplug.gradle?= =?UTF-8?q?.spotless=20from=203.25.0=20to=203=E2=80=A6=20(#2429)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../org/fossasia/openevent/general/ticket/TicketsViewModel.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5f1bf4b876..1a3d498fe9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.diffplug.gradle.spotless" version "3.25.0" + id "com.diffplug.gradle.spotless" version "3.26.0" } apply plugin: 'com.android.application' diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt index 049c0f0578..da63e96137 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt @@ -119,7 +119,7 @@ class TicketsViewModel( qty.add(it.second) } } - val donation = ticketIdAndQty.map { it.third*it.second }.sum() + val donation = ticketIdAndQty.map { it.third * it.second }.sum() tickets.value?.filter { ticketIds.contains(it.id) }?.let { tickets -> var prices = 0F var index = 0 @@ -130,7 +130,7 @@ class TicketsViewModel( if (code?.value != null) { appliedDiscountCode?.tickets?.forEach { ticketId -> if (ticket.id == ticketId.id.toInt()) { - price -= if (code.type == AMOUNT) code.value else price*(code.value / 100) + price -= if (code.type == AMOUNT) code.value else price * (code.value / 100) } } } From 7a0dd3f17ba47b3e7b82c5f7b71ae13d465fe8e0 Mon Sep 17 00:00:00 2001 From: Pulkit Aggarwal Date: Mon, 18 Nov 2019 12:20:59 +0530 Subject: [PATCH 32/54] feat: Remove useless native binaries from paypal SDK (#2426) (#2427) --- app/build.gradle | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 1a3d498fe9..6a48cbfd29 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -92,8 +92,31 @@ android { testOptions { unitTests.returnDefaultValues = true } + // Exclusions added for Paypal SDK packagingOptions { pickFirst 'kotlin/**' + exclude 'lib/arm64-v8a/libcardioDecider.so' + exclude 'lib/arm64-v8a/libcardioRecognizer.so' + exclude 'lib/arm64-v8a/libcardioRecognizer_tegra2.so' + exclude 'lib/arm64-v8a/libopencv_core.so' + exclude 'lib/arm64-v8a/libopencv_imgproc.so' + exclude 'lib/armeabi/libcardioDecider.so' + exclude 'lib/armeabi-v7a/libcardioDecider.so' + exclude 'lib/armeabi-v7a/libcardioRecognizer.so' + exclude 'lib/armeabi-v7a/libcardioRecognizer_tegra2.so' + exclude 'lib/armeabi-v7a/libopencv_core.so' + exclude 'lib/armeabi-v7a/libopencv_imgproc.so' + exclude 'lib/mips/libcardioDecider.so' + exclude 'lib/x86/libcardioDecider.so' + exclude 'lib/x86/libcardioRecognizer.so' + exclude 'lib/x86/libcardioRecognizer_tegra2.so' + exclude 'lib/x86/libopencv_core.so' + exclude 'lib/x86/libopencv_imgproc.so' + exclude 'lib/x86_64/libcardioDecider.so' + exclude 'lib/x86_64/libcardioRecognizer.so' + exclude 'lib/x86_64/libcardioRecognizer_tegra2.so' + exclude 'lib/x86_64/libopencv_core.so' + exclude 'lib/x86_64/libopencv_imgproc.so' } lintOptions { disable 'MissingTranslation' From b9b84ffdec649cffd9364eb90bd4acd340d90d69 Mon Sep 17 00:00:00 2001 From: Robin Singh Date: Tue, 19 Nov 2019 11:55:27 +0530 Subject: [PATCH 33/54] fix: Add prices in for all tickets in TicketIdAndQty (#2416) --- .../general/ticket/TicketViewHolder.kt | 2 +- .../general/ticket/TicketsViewModel.kt | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt index aeb22b4195..73902dcc47 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketViewHolder.kt @@ -118,7 +118,7 @@ class TicketViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { val price = if (tax?.rate != null && tax.isTaxIncludedInPrice) (ticket.price * 100) / (100 + tax.rate) else ticket.price val priceDetail = if (price > 0) "$eventCurrency${"%.2f".format(price)}" - else resource.getString(R.string.free) + else resource.getString(R.string.free) val priceInfo = "${resource.getString(R.string.price)}: $priceDetail" itemView.priceInfo.text = Html.fromHtml(priceInfo) diff --git a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt index da63e96137..9e54b8ee80 100644 --- a/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt +++ b/app/src/main/java/org/fossasia/openevent/general/ticket/TicketsViewModel.kt @@ -107,26 +107,22 @@ class TicketsViewModel( fun getAmount(ticketIdAndQty: List>): Float { val ticketIds = ArrayList() - val qty = ArrayList() val tax = taxInfo.value var taxRate = 0f + totalTaxAmount = 0f if (tax != null && !tax.isTaxIncludedInPrice) { taxRate = tax.rate ?: 0f } ticketIdAndQty.forEach { - if (it.second > 0) { - ticketIds.add(it.first) - qty.add(it.second) - } + ticketIds.add(it.first) } val donation = ticketIdAndQty.map { it.third * it.second }.sum() tickets.value?.filter { ticketIds.contains(it.id) }?.let { tickets -> var prices = 0F - var index = 0 val code = appliedDiscountCode tickets.forEach { ticket -> var price = ticket.price - totalTaxAmount += (ticket.price * taxRate / 100) * qty[index] + totalTaxAmount += (ticket.price * taxRate / 100) * ticketIdAndQty[tickets.indexOf(ticket)].second if (code?.value != null) { appliedDiscountCode?.tickets?.forEach { ticketId -> if (ticket.id == ticketId.id.toInt()) { @@ -134,8 +130,7 @@ class TicketsViewModel( } } } - price.let { prices += price * qty[index] } - index++ + price.let { prices += price * ticketIdAndQty[tickets.indexOf(ticket)].second } } prices += totalTaxAmount return prices + donation @@ -156,8 +151,8 @@ class TicketsViewModel( if (it is HttpException) if (it.code() == HttpErrors.NOT_FOUND) Timber.e(it, "No tax for this event") - else - Timber.e(it, "Error fetching tax details") + else + Timber.e(it, "Error fetching tax details") }) } From 2e264c76a6ad388c2db1e3dd5b87c9283ad04400 Mon Sep 17 00:00:00 2001 From: Robin Singh Date: Tue, 19 Nov 2019 12:18:18 +0530 Subject: [PATCH 34/54] fix: UI conflict in ticket section (#2431) --- app/src/main/res/layout/fragment_orders_under_user.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/layout/fragment_orders_under_user.xml b/app/src/main/res/layout/fragment_orders_under_user.xml index a781aeaf24..73cf5da9ba 100644 --- a/app/src/main/res/layout/fragment_orders_under_user.xml +++ b/app/src/main/res/layout/fragment_orders_under_user.xml @@ -118,7 +118,7 @@ android:id="@+id/noTicketsScreen" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="@dimen/layout_margin_extra_large" + android:layout_margin="@dimen/layout_margin_extreme_large" app:layout_constraintTop_toBottomOf="@id/ordersRecycler" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" From c9619524f8baa7041751b7aa270996a87888b610 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2019 03:06:46 +0530 Subject: [PATCH 35/54] =?UTF-8?q?chore(deps):=20bump=20leakcanary-android?= =?UTF-8?q?=20from=202.0-beta-3=20to=202.0-bet=E2=80=A6=20(#2432)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [leakcanary-android](https://github.com/square/leakcanary) from 2.0-beta-3 to 2.0-beta-4. - [Release notes](https://github.com/square/leakcanary/releases) - [Changelog](https://github.com/square/leakcanary/blob/master/docs/changelog.md) - [Commits](https://github.com/square/leakcanary/commits) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 6a48cbfd29..1eb44f4f1a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -241,7 +241,7 @@ dependencies { testImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1' //LeakCanary - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-3' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-4' // Paging implementation "androidx.paging:paging-runtime:$paging_version" From 0a13dce62a712133c7ce1796482efb0c79bcbf1c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2019 03:54:38 +0530 Subject: [PATCH 36/54] chore(deps): bump recyclerview from 1.1.0-rc01 to 1.1.0 (#2435) Bumps recyclerview from 1.1.0-rc01 to 1.1.0. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 1eb44f4f1a..31df8e7ee0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -161,7 +161,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0-rc01' + implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'com.google.android.material:material:1.1.0-beta01' implementation "androidx.browser:browser:1.0.0" implementation 'androidx.exifinterface:exifinterface:1.0.0' From 06137953b24d00d6a748d719d81e33b50cb80bcb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2019 03:54:46 +0530 Subject: [PATCH 37/54] chore(deps): bump exifinterface from 1.0.0 to 1.1.0 (#2436) Bumps exifinterface from 1.0.0 to 1.1.0. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 31df8e7ee0..7618a8b81b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -164,7 +164,7 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'com.google.android.material:material:1.1.0-beta01' implementation "androidx.browser:browser:1.0.0" - implementation 'androidx.exifinterface:exifinterface:1.0.0' + implementation 'androidx.exifinterface:exifinterface:1.1.0' implementation "androidx.lifecycle:lifecycle-extensions:${lifecycle_version}" implementation "androidx.lifecycle:lifecycle-common-java8:${lifecycle_version}" implementation "androidx.lifecycle:lifecycle-reactivestreams:${lifecycle_version}" From 3dfb16bc42376e793f3102c40cd12566250d5b14 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2019 03:55:03 +0530 Subject: [PATCH 38/54] chore(deps): bump roomVersion from 2.2.1 to 2.2.2 (#2433) Bumps `roomVersion` from 2.2.1 to 2.2.2. Updates `room-runtime` from 2.2.1 to 2.2.2 Updates `room-rxjava2` from 2.2.1 to 2.2.2 Updates `room-compiler` from 2.2.1 to 2.2.2 Updates `room-testing` from 2.2.1 to 2.2.2 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 7618a8b81b..654a561890 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -149,7 +149,7 @@ repositories { dependencies { def lifecycle_version = "2.2.0-rc02" def koin_version = "2.0.1" - def roomVersion = "2.2.1" + def roomVersion = "2.2.2" def ktx_version = "1.1.0" def ktx2_version = "2.1.0" def nav_version = "2.1.0" From 09a7e896cc77acca9f365e059bc34a6728816023 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2019 03:51:10 +0530 Subject: [PATCH 39/54] chore(deps): bump stripe-android from 12.4.0 to 12.5.0 (#2437) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.4.0 to 12.5.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.4.0...v12.5.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 654a561890..4fa60953ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -215,7 +215,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.4.0' + implementation 'com.stripe:stripe-android:12.5.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From ea2f2a8571ac38d49c0139f6aa766040c5a7dbb9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2019 03:07:15 +0530 Subject: [PATCH 40/54] =?UTF-8?q?chore(deps):=20bump=20leakcanary-android?= =?UTF-8?q?=20from=202.0-beta-4=20to=202.0-bet=E2=80=A6=20(#2438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [leakcanary-android](https://github.com/square/leakcanary) from 2.0-beta-4 to 2.0-beta-5. - [Release notes](https://github.com/square/leakcanary/releases) - [Changelog](https://github.com/square/leakcanary/blob/master/docs/changelog.md) - [Commits](https://github.com/square/leakcanary/commits) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4fa60953ab..2f05e0fb8e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -241,7 +241,7 @@ dependencies { testImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1' //LeakCanary - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-4' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-5' // Paging implementation "androidx.paging:paging-runtime:$paging_version" From 010b71555ab8ca85ef00dcaf22080f7216bfbc48 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2019 03:07:41 +0530 Subject: [PATCH 41/54] chore(deps): bump rxjava from 2.2.14 to 2.2.15 (#2439) Bumps [rxjava](https://github.com/ReactiveX/RxJava) from 2.2.14 to 2.2.15. - [Release notes](https://github.com/ReactiveX/RxJava/releases) - [Changelog](https://github.com/ReactiveX/RxJava/blob/v2.2.15/CHANGES.md) - [Commits](https://github.com/ReactiveX/RxJava/compare/v2.2.14...v2.2.15) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 2f05e0fb8e..a6816b8912 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -208,7 +208,7 @@ dependencies { // RxJava implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0' - implementation 'io.reactivex.rxjava2:rxjava:2.2.14' + implementation 'io.reactivex.rxjava2:rxjava:2.2.15' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2' // Picasso From fd13e0a0fc111a057591d02cb53cb749f5ea9ae6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2019 03:23:10 +0530 Subject: [PATCH 42/54] chore(deps): bump kotlin_version from 1.3.60 to 1.3.61 (#2440) Bumps `kotlin_version` from 1.3.60 to 1.3.61. Updates `kotlin-gradle-plugin` from 1.3.60 to 1.3.61 Updates `kotlin-stdlib-jdk7` from 1.3.60 to 1.3.61 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 51527383d9..c721e61c02 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.60' + ext.kotlin_version = '1.3.61' repositories { google() From 57da38ec6351e375648bcdec79c696ff99b27e14 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2019 10:35:54 +0530 Subject: [PATCH 43/54] chore(deps): bump stripe-android from 12.5.0 to 12.6.0 (#2441) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.5.0 to 12.6.0. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.5.0...v12.6.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index a6816b8912..f4857edb3b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -215,7 +215,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.5.0' + implementation 'com.stripe:stripe-android:12.6.0' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From 4c18e237f9ab97c83deca9a8673fc0fe3846f2b8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2019 10:53:26 +0530 Subject: [PATCH 44/54] chore(deps): bump leakcanary-android from 2.0-beta-5 to 2.0 (#2442) Bumps [leakcanary-android](https://github.com/square/leakcanary) from 2.0-beta-5 to 2.0. - [Release notes](https://github.com/square/leakcanary/releases) - [Changelog](https://github.com/square/leakcanary/blob/master/docs/changelog.md) - [Commits](https://github.com/square/leakcanary/commits/v2.0) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f4857edb3b..8f248f0822 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -241,7 +241,7 @@ dependencies { testImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1' //LeakCanary - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-5' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0' // Paging implementation "androidx.paging:paging-runtime:$paging_version" From 30f6261b73f6fb0b586bd8d2cd65e76974f61236 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2019 11:43:21 +0530 Subject: [PATCH 45/54] =?UTF-8?q?chore(deps):=20bump=20com.diffplug.gradle?= =?UTF-8?q?.spotless=20from=203.26.0=20to=203=E2=80=A6=20(#2443)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps com.diffplug.gradle.spotless from 3.26.0 to 3.26.1. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 8f248f0822..044e08d91b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.diffplug.gradle.spotless" version "3.26.0" + id "com.diffplug.gradle.spotless" version "3.26.1" } apply plugin: 'com.android.application' From 78e1ab42e6ce56d51e1e73522d6e124895bae6bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2019 06:44:59 +0530 Subject: [PATCH 46/54] chore(deps): bump stripe-android from 12.6.0 to 12.6.1 (#2446) Bumps [stripe-android](https://github.com/stripe/stripe-android) from 12.6.0 to 12.6.1. - [Release notes](https://github.com/stripe/stripe-android/releases) - [Changelog](https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md) - [Commits](https://github.com/stripe/stripe-android/compare/v12.6.0...v12.6.1) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 044e08d91b..d5bb8bacb5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -215,7 +215,7 @@ dependencies { implementation 'com.squareup.picasso:picasso:2.71828' // Stripe - implementation 'com.stripe:stripe-android:12.6.0' + implementation 'com.stripe:stripe-android:12.6.1' // QR Code implementation 'com.journeyapps:zxing-android-embedded:3.6.0' From db83d88fcfedac5a9d5c6b08ef7404d191ea59dc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2019 03:33:55 +0530 Subject: [PATCH 47/54] =?UTF-8?q?chore(deps):=20bump=20lifecycle=5Fversion?= =?UTF-8?q?=20from=202.2.0-rc02=20to=202.2.0-rc=E2=80=A6=20(#2451)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `lifecycle_version` from 2.2.0-rc02 to 2.2.0-rc03. Updates `lifecycle-extensions` from 2.2.0-rc02 to 2.2.0-rc03 Updates `lifecycle-common-java8` from 2.2.0-rc02 to 2.2.0-rc03 Updates `lifecycle-reactivestreams` from 2.2.0-rc02 to 2.2.0-rc03 Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index d5bb8bacb5..4fd85c8fc7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -147,7 +147,7 @@ repositories { } dependencies { - def lifecycle_version = "2.2.0-rc02" + def lifecycle_version = "2.2.0-rc03" def koin_version = "2.0.1" def roomVersion = "2.2.2" def ktx_version = "1.1.0" From e8412eadbcb9399e7c306be9b061758717aeb213 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2019 11:06:49 +0530 Subject: [PATCH 48/54] chore(deps): bump gradle from 3.5.2 to 3.5.3 (#2453) Bumps gradle from 3.5.2 to 3.5.3. Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c721e61c02..a832df2317 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:3.5.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0' classpath "gradle.plugin.com.github.b3er.local.properties:local-properties-plugin:1.1" From 1b661132cf962c945d183f69caef2ad9011d916c Mon Sep 17 00:00:00 2001 From: Shubham Pathak Date: Sat, 7 Dec 2019 22:31:19 +0530 Subject: [PATCH 49/54] fix: Fab size issue (#2461) --- app/src/main/res/layout/item_card_similar_events.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/layout/item_card_similar_events.xml b/app/src/main/res/layout/item_card_similar_events.xml index fe69efbab1..82408de94a 100644 --- a/app/src/main/res/layout/item_card_similar_events.xml +++ b/app/src/main/res/layout/item_card_similar_events.xml @@ -47,10 +47,10 @@ Date: Tue, 10 Dec 2019 11:06:27 +0530 Subject: [PATCH 50/54] chore(deps): bump adapter-rxjava2 from 2.6.2 to 2.7.0 (#2471) Bumps adapter-rxjava2 from 2.6.2 to 2.7.0. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4fd85c8fc7..b774db80c3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -209,7 +209,7 @@ dependencies { implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0' implementation 'io.reactivex.rxjava2:rxjava:2.2.15' - implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2' + implementation 'com.squareup.retrofit2:adapter-rxjava2:2.7.0' // Picasso implementation 'com.squareup.picasso:picasso:2.71828' From 37293790913da9f598b55258e6faa2f39b720ca4 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2019 11:21:03 +0530 Subject: [PATCH 51/54] chore(deps): bump retrofit from 2.6.2 to 2.7.0 (#2473) Bumps [retrofit](https://github.com/square/retrofit) from 2.6.2 to 2.7.0. - [Release notes](https://github.com/square/retrofit/releases) - [Changelog](https://github.com/square/retrofit/blob/master/CHANGELOG.md) - [Commits](https://github.com/square/retrofit/commits) Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index b774db80c3..60f381558e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -199,7 +199,7 @@ dependencies { implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.1" implementation 'com.github.jasminb:jsonapi-converter:0.9' implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2' - implementation 'com.squareup.retrofit2:retrofit:2.6.2' + implementation 'com.squareup.retrofit2:retrofit:2.7.0' implementation 'com.squareup.retrofit2:converter-jackson:2.6.2' // Cards Shimmer Animation From e55cd4162f29bdd8f7831dd96352d7d05d06896d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2019 12:01:07 +0530 Subject: [PATCH 52/54] chore(deps): bump converter-jackson from 2.6.2 to 2.7.0 (#2472) Bumps converter-jackson from 2.6.2 to 2.7.0. Signed-off-by: dependabot-preview[bot] --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 60f381558e..eee006c0c9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -200,7 +200,7 @@ dependencies { implementation 'com.github.jasminb:jsonapi-converter:0.9' implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2' implementation 'com.squareup.retrofit2:retrofit:2.7.0' - implementation 'com.squareup.retrofit2:converter-jackson:2.6.2' + implementation 'com.squareup.retrofit2:converter-jackson:2.7.0' // Cards Shimmer Animation implementation 'com.facebook.shimmer:shimmer:0.5.0' From 530479953be78f3138befb918a403dad96fee0a9 Mon Sep 17 00:00:00 2001 From: Varun Saini Date: Tue, 10 Dec 2019 13:03:01 +0530 Subject: [PATCH 53/54] fix: Enter location" recyclerview bottom margin (#2474) * fix:issue #2470 * Fix: issue #2470 * fix: #2470 removed extra-margin-attrs --- app/src/main/res/layout/fragment_search_location.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/res/layout/fragment_search_location.xml b/app/src/main/res/layout/fragment_search_location.xml index ad1321d62d..0d68880871 100644 --- a/app/src/main/res/layout/fragment_search_location.xml +++ b/app/src/main/res/layout/fragment_search_location.xml @@ -86,11 +86,7 @@ Date: Tue, 10 Dec 2019 15:52:45 +0530 Subject: [PATCH 54/54] chore: Update version for 0.9.0 (#2478) --- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/16.txt | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/16.txt diff --git a/app/build.gradle b/app/build.gradle index eee006c0c9..9961bb6046 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "com.eventyay.attendee" minSdkVersion 21 targetSdkVersion 28 - versionCode 15 - versionName "0.8.0" + versionCode 16 + versionName "0.9.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true multiDexEnabled true diff --git a/fastlane/metadata/android/en-US/changelogs/16.txt b/fastlane/metadata/android/en-US/changelogs/16.txt new file mode 100644 index 0000000000..09dcd2e2c2 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/16.txt @@ -0,0 +1,11 @@ +v0.9.0: +🚀 Features + +- Reduce APK size by removing redundant Paypal binaries +- Enable PayPal payment option + +🐛 Bug Fixes + +- Fix app crash in search +- Some UI fixes +- Other fixes and dependency updates