Skip to content

Commit

Permalink
fix: Upgrade to relaydroid 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarea committed Mar 15, 2021
1 parent d858a4c commit 23db367
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {
kapt 'com.google.dagger:dagger-compiler:2.33'

// Relaynet
implementation 'tech.relaycorp:relaydroid:1.3.4'
implementation 'tech.relaycorp:relaydroid:1.4.0'

// Preferences
implementation 'androidx.preference:preference-ktx:1.1.1'
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/tech/relaycorp/ping/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import kotlinx.coroutines.launch
import tech.relaycorp.ping.di.AppComponent
import tech.relaycorp.ping.di.AppModule
import tech.relaycorp.ping.di.DaggerAppComponent
import tech.relaycorp.relaydroid.GatewayClient
import tech.relaycorp.relaydroid.Relaynet
import tech.relaycorp.relaydroid.RelaynetTemp.GatewayClient
import javax.inject.Inject

class App : Application() {
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/tech/relaycorp/ping/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import tech.relaycorp.relaydroid.RelaynetTemp
import tech.relaycorp.relaydroid.GatewayClient
import tech.relaycorp.relaydroid.endpoint.FirstPartyEndpoint
import tech.relaycorp.relaydroid.endpoint.PublicThirdPartyEndpoint
import tech.relaycorp.relaydroid.messaging.ParcelId
Expand Down Expand Up @@ -40,7 +40,7 @@ class MainActivity : AppCompatActivity() {
lifecycleScope.launch {
send.isEnabled = false
withContext(backgroundContext) {
RelaynetTemp.GatewayClient.bind()
GatewayClient.bind()
sender = FirstPartyEndpoint.register()
recipient = PublicThirdPartyEndpoint.import(
"ping.awala.services",
Expand Down Expand Up @@ -86,7 +86,7 @@ class MainActivity : AppCompatActivity() {
recipientEndpoint = recipient,
parcelId = id
)
RelaynetTemp.GatewayClient.sendMessage(outgoingMessage)
GatewayClient.sendMessage(outgoingMessage)
val pingMessage = PingMessage(outgoingMessage.parcelId.value)
repository.set(pingMessage)
}
Expand All @@ -101,6 +101,6 @@ class MainActivity : AppCompatActivity() {

override fun onDestroy() {
super.onDestroy()
RelaynetTemp.GatewayClient.unbind()
GatewayClient.unbind()
}
}

0 comments on commit 23db367

Please sign in to comment.