Skip to content

Commit 9c6cd6f

Browse files
Merge pull request #2024 from fossasia/development
chore: Release v0.5.0
2 parents 63aa2fd + 053c967 commit 9c6cd6f

File tree

8 files changed

+37
-33
lines changed

8 files changed

+37
-33
lines changed

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name-template: v$NEXT_PATCH_VERSION 🌈
2-
tag-template: v$NEXT_PATCH_VERSION
1+
name-template: Release v$NEXT_MINOR_VERSION 🌈
2+
tag-template: v$NEXT_MINOR_VERSION
33
categories:
44
- title: 🚀 Features
55
label: feature

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ android {
2020
applicationId "com.eventyay.attendee"
2121
minSdkVersion 21
2222
targetSdkVersion 28
23-
versionCode 10
24-
versionName "0.4.0"
23+
versionCode 11
24+
versionName "0.5.0"
2525
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2626
vectorDrawables.useSupportLibrary = true
2727
multiDexEnabled true

app/src/main/java/org/fossasia/openevent/general/event/EventDetailsFragment.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,6 @@ class EventDetailsFragment : Fragment() {
589589
menu.findItem(R.id.open_external_event_url).isVisible = false
590590
if (currentEvent.codeOfConduct.isNullOrBlank())
591591
menu.findItem(R.id.code_of_conduct).isVisible = false
592-
if (currentEvent.speakersCall == null)
593-
menu.findItem(R.id.call_for_speakers).isVisible = false
594592
setFavoriteIconFilled(currentEvent.favorite)
595593
}
596594
super.onPrepareOptionsMenu(menu)

app/src/main/java/org/fossasia/openevent/general/event/EventService.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ class EventService(
6060
.toList()
6161
}
6262

63-
fun getEventTopics(): Flowable<List<EventTopic>> {
64-
return eventTopicsDao.getAllEventTopics()
65-
}
66-
6763
fun getEventTypes(): Single<List<EventType>> {
6864
return eventTypesApi.getEventTypes()
6965
}
@@ -85,6 +81,9 @@ class EventService(
8581
val query = "[{\"name\":\"location-name\",\"op\":\"ilike\",\"val\":\"%$locationName%\"}," +
8682
"{\"name\":\"ends-at\",\"op\":\"ge\",\"val\":\"%${EventUtils.getTimeInISO8601(Date())}%\"}]"
8783
return eventApi.searchEvents("name", query).flatMapPublisher { apiList ->
84+
apiList.forEach {
85+
it.speakersCall?.let { sc -> speakersCallDao.insertSpeakerCall(sc) }
86+
}
8887
updateFavorites(apiList)
8988
}
9089
}

app/src/main/java/org/fossasia/openevent/general/search/SearchResultsFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import kotlinx.android.synthetic.main.fragment_search_results.view.eventsRecycle
2727
import kotlinx.android.synthetic.main.fragment_search_results.view.noSearchResults
2828
import kotlinx.android.synthetic.main.fragment_search_results.view.shimmerSearch
2929
import kotlinx.android.synthetic.main.fragment_search_results.view.toolbar
30+
import kotlinx.android.synthetic.main.fragment_search_results.view.toolbarLayout
3031
import kotlinx.android.synthetic.main.fragment_search_results.view.searchText
3132
import kotlinx.android.synthetic.main.fragment_search_results.view.filter
3233
import kotlinx.android.synthetic.main.fragment_search_results.view.clearSearchText
@@ -51,6 +52,7 @@ import org.fossasia.openevent.general.utils.Utils.hideSoftKeyboard
5152
import org.fossasia.openevent.general.utils.Utils.showSoftKeyboard
5253
import org.fossasia.openevent.general.utils.extensions.setPostponeSharedElementTransition
5354
import org.fossasia.openevent.general.utils.extensions.setStartPostponedEnterTransition
55+
import kotlin.math.abs
5456

5557
class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener {
5658

@@ -263,11 +265,13 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener
263265
})
264266

265267
rootView.appBar.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { appBarLayout, offset ->
266-
if (Math.abs(offset) == appBarLayout.totalScrollRange) {
268+
if (abs(offset) == appBarLayout.totalScrollRange) {
267269
rootView.toolbarTitle.text = if (rootView.searchText.text.isNullOrBlank())
268270
getString(R.string.search_hint) else rootView.searchText.text.toString()
271+
rootView.toolbarLayout.elevation = resources.getDimension(R.dimen.custom_toolbar_elevation)
269272
} else {
270273
rootView.toolbarTitle.text = ""
274+
rootView.toolbarLayout.elevation = 0F
271275
}
272276
})
273277

app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallFragment.kt

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,6 @@ class SpeakersCallFragment : Fragment() {
3838
private val speakersCallViewModel by viewModel<SpeakersCallViewModel>()
3939
private val safeArgs: SpeakersCallFragmentArgs by navArgs()
4040

41-
override fun onCreate(savedInstanceState: Bundle?) {
42-
super.onCreate(savedInstanceState)
43-
if (speakersCallViewModel.isLoggedIn()) {
44-
val currentUser = speakersCallViewModel.user.value
45-
if (currentUser == null) {
46-
speakersCallViewModel.loadMyUserAndSpeaker(safeArgs.eventId, safeArgs.eventIdentifier)
47-
} else {
48-
val currentSpeaker = speakersCallViewModel.speaker.value
49-
if (currentSpeaker == null) {
50-
speakersCallViewModel.loadMySpeaker(currentUser, safeArgs.eventId, safeArgs.eventIdentifier)
51-
}
52-
}
53-
}
54-
}
55-
5641
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
5742
rootView = inflater.inflate(R.layout.fragment_speakers_call, container, false)
5843

@@ -85,6 +70,18 @@ class SpeakersCallFragment : Fragment() {
8570
showEmptyView(false)
8671
})
8772

73+
if (speakersCallViewModel.isLoggedIn()) {
74+
val currentUser = speakersCallViewModel.user.value
75+
if (currentUser == null) {
76+
speakersCallViewModel.loadMyUserAndSpeaker(safeArgs.eventId, safeArgs.eventIdentifier)
77+
} else {
78+
val currentSpeaker = speakersCallViewModel.speaker.value
79+
if (currentSpeaker == null) {
80+
speakersCallViewModel.loadMySpeaker(currentUser, safeArgs.eventId, safeArgs.eventIdentifier)
81+
}
82+
}
83+
}
84+
8885
speakersCallViewModel.loadSpeakersCall(safeArgs.eventId)
8986
return rootView
9087
}
@@ -150,9 +147,9 @@ class SpeakersCallFragment : Fragment() {
150147
}
151148

152149
private fun showEmptyView(show: Boolean) {
153-
rootView.speakersCallContainer.visibility = if (show) View.GONE else View.VISIBLE
154-
rootView.speakersCallEmptyView.visibility = if (show) View.VISIBLE else View.GONE
155-
if (show) rootView.submitProposalButton.visibility = View.GONE
150+
rootView.speakersCallContainer.isVisible = !show
151+
rootView.speakersCallEmptyView.isVisible = show
152+
if (show) rootView.submitProposalButton.isVisible = false
156153
}
157154

158155
private fun loadSpeakersCallSection(speakersCall: SpeakersCall) {

app/src/main/java/org/fossasia/openevent/general/speakercall/SpeakersCallViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ class SpeakersCallViewModel(
3131
val speakersCall: LiveData<SpeakersCall> = mutableSpeakersCall
3232
private val mutableMessage = SingleLiveEvent<String>()
3333
val message: LiveData<String> = mutableMessage
34-
private val mutableProgress = MutableLiveData<Boolean>(true)
34+
private val mutableProgress = MutableLiveData(true)
3535
val progress: LiveData<Boolean> = mutableProgress
3636
private val mutableSpeaker = MutableLiveData<Speaker>()
3737
val speaker: LiveData<Speaker> = mutableSpeaker
3838
private val mutableUser = MutableLiveData<User>()
3939
val user: LiveData<User> = mutableUser
40-
private val mutableEmptySpeakersCall = MutableLiveData<Boolean>(true)
40+
private val mutableEmptySpeakersCall = MutableLiveData<Boolean>()
4141
val emptySpeakersCall: LiveData<Boolean> = mutableEmptySpeakersCall
4242

4343
fun isLoggedIn(): Boolean = authHolder.isLoggedIn()

app/src/main/res/layout/fragment_search_results.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@
77
android:layout_height="match_parent"
88
android:orientation="vertical">
99

10+
<androidx.cardview.widget.CardView
11+
android:id="@+id/toolbarLayout"
12+
android:layout_width="match_parent"
13+
android:layout_height="wrap_content"
14+
android:elevation="0dp"
15+
app:layout_constraintTop_toTopOf="parent">
1016
<androidx.appcompat.widget.Toolbar
1117
android:id="@+id/toolbar"
1218
android:background="@color/colorPrimary"
1319
app:titleTextColor="@color/black"
1420
android:layout_width="match_parent"
1521
app:navigationIcon="@drawable/ic_arrow_back_black"
1622
android:layout_height="wrap_content"
17-
android:backgroundTint="@color/white"
18-
app:layout_constraintTop_toTopOf="parent">
23+
android:backgroundTint="@color/white">
1924
<TextView
2025
android:id="@+id/toolbarTitle"
2126
style = "@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
@@ -31,6 +36,7 @@
3136
android:tint="@color/black"
3237
android:src="@drawable/ic_filter"/>
3338
</androidx.appcompat.widget.Toolbar>
39+
</androidx.cardview.widget.CardView>
3440

3541
<androidx.coordinatorlayout.widget.CoordinatorLayout
3642
android:layout_width="match_parent"

0 commit comments

Comments
 (0)