Skip to content

Commit

Permalink
chore: Bump spotless from 3.16.0 to 3.23.0 and fix the violations (#1777
Browse files Browse the repository at this point in the history
)
  • Loading branch information
liveHarshit authored and iamareebjamal committed May 17, 2019
1 parent 9b3c9b3 commit 92d3a36
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.16.0"
id "com.diffplug.gradle.spotless" version "3.23.0"
}

apply plugin: 'com.android.application'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class EditProfileFragment : Fragment() {
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos)
val bytes = baos.toByteArray()

//create temp file
// create temp file
try {

val tempAvatar = File(context?.cacheDir, "tempAvatar")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class EventDetailsViewModel(
fun fetchEventSpeakers(id: Long) {
speakerService.fetchSpeakersForEvent(id)
.withDefaultSchedulers()
.subscribe ({
//Do Nothing
.subscribe({
// Do Nothing
}, {
Timber.e(it, "Error fetching speaker for event id %d", id)
mutablePopMessage.value = resource.getString(R.string.error_fetching_event_section_message,
Expand All @@ -98,8 +98,8 @@ class EventDetailsViewModel(
fun fetchEventSponsors(id: Long) {
sponsorService.fetchSponsorsWithEvent(id)
.withDefaultSchedulers()
.subscribe ({
//Do Nothing
.subscribe({
// Do Nothing
}, {
Timber.e(it, "Error fetching sponsor for event id %d", id)
mutablePopMessage.value = resource.getString(R.string.error_fetching_event_section_message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
rootView = inflater.inflate(R.layout.fragment_search_results, container, false)

setChips( eventDate, eventType)
setChips(eventDate, eventType)
setToolbar(activity, getString(R.string.search_results))
setHasOptionsMenu(true)

Expand Down Expand Up @@ -134,7 +134,7 @@ class SearchResultsFragment : Fragment(), CompoundButton.OnCheckedChangeListener
}

private fun setChips(date: String = eventDate, type: String = eventType) {
if (rootView.chipGroup.childCount>0) {
if (rootView.chipGroup.childCount> 0) {
rootView.chipGroup.removeAllViews()
}
when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SpeakerViewModel(
}
compositeDisposable += speakerService.fetchSpeaker(id)
.withDefaultSchedulers()
.subscribe ({
.subscribe({
mutableSpeaker.value = it
}, {
Timber.e(it, "Error fetching speaker for id %d", id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.fossasia.openevent.general.sponsor
import androidx.lifecycle.LiveData
import io.reactivex.Single

class SponsorService (
class SponsorService(
private val sponsorApi: SponsorApi,
private val sponsorDao: SponsorDao,
private val sponsorWithEventDao: SponsorWithEventDao
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import io.reactivex.Single
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

fun <T> Single<T> .withDefaultSchedulers():
fun <T> Single<T>.withDefaultSchedulers():
Single<T> = subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())

fun <T> Flowable<T> .withDefaultSchedulers():
fun <T> Flowable<T>.withDefaultSchedulers():
Flowable<T> = subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())

fun Completable .withDefaultSchedulers():
fun Completable.withDefaultSchedulers():
Completable = subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SmartAuthViewModel : ViewModel() {
})
}

fun saveCredential (id: String, password: String, credentialsClient: CredentialsClient) {
fun saveCredential(id: String, password: String, credentialsClient: CredentialsClient) {
val credential = Credential.Builder(id).setPassword(password).build()
credentialsClient.save(credential).addOnCompleteListener(
OnCompleteListener<Void> { task ->
Expand Down

0 comments on commit 92d3a36

Please sign in to comment.