Skip to content

Commit

Permalink
Add firebase back
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed May 7, 2020
1 parent d947815 commit 844c0f1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ buildscript {
'testhelp' : '0.2.8',
'firebase' : '17.4.0',
'firestoreAndroid' : '21.4.3',
'firestoreKmp' : '0.2.6',
'firestoreKmp' : '0.2.8-mt',
'fabric' : '1.31.2',
'crashlytics' : '2.10.1'
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
package co.touchlab.sessionize

import co.touchlab.firebase.firestore.DocumentSnapshot
import co.touchlab.firebase.firestore.QuerySnapshot
import co.touchlab.firebase.firestore.Source
import co.touchlab.firebase.firestore.TaskData
import co.touchlab.firebase.firestore.collection
import co.touchlab.firebase.firestore.data_
import co.touchlab.firebase.firestore.documents_
import co.touchlab.firebase.firestore.getFirebaseInstance
import co.touchlab.firebase.firestore.get_
import co.touchlab.firebase.firestore.id
import co.touchlab.firebase.firestore.orderBy
import co.touchlab.sessionize.jsondata.Sponsor
import co.touchlab.sessionize.jsondata.SponsorGroup
import kotlin.native.concurrent.ThreadLocal
Expand All @@ -11,7 +22,6 @@ object SponsorsModel : BaseModel(ServiceRegistry.coroutinesDispatcher) {
proc: (sponsors: List<SponsorGroup>) -> Unit,
error: (ex: Throwable) -> Unit
) {
/*
getFirebaseInstance()
.collection("sponsors-sf-2019")
.orderBy("displayOrder")
Expand All @@ -21,16 +31,15 @@ object SponsorsModel : BaseModel(ServiceRegistry.coroutinesDispatcher) {
},{
ServiceRegistry.softExceptionCallback(it, "loadSponsorsFromServer failed")
error(it)
})*/
})
}
/*

private fun sponsorGroupsFrom(documentSnapshots: List<DocumentSnapshot>): List<SponsorGroup> {
return documentSnapshots.map {
sponsorGroupFrom(it)
}
}
*/
/*

private fun sponsorGroupFrom(documentSnapshot: DocumentSnapshot): SponsorGroup {
val groupName = documentSnapshot.id.capitalize()
val level = documentSnapshot.data_()
Expand All @@ -48,9 +57,9 @@ object SponsorsModel : BaseModel(ServiceRegistry.coroutinesDispatcher) {
}

return SponsorGroup(groupName, sponsors)
}*/
}
}

fun sponsorClicked(sponsor: Sponsor){
//ServiceRegistry.analyticsApi.logEvent("sponsor_clicked", mapOf(Pair("id", sponsor.sponsorId.toString()), Pair("name", sponsor.name)))
}
ServiceRegistry.analyticsApi.logEvent("sponsor_clicked", mapOf(Pair("id", sponsor.sponsorId.toString()), Pair("name", sponsor.name)))
}

0 comments on commit 844c0f1

Please sign in to comment.