Search in sources :

Example 1 with UpdateGoogleCredentialsEvent

use of io.jawg.osmcontributor.ui.events.login.UpdateGoogleCredentialsEvent in project osm-contributor by jawg.

the class MyPreferenceFragment method onGoogleAuthenticatedEvent.

@Subscribe
public void onGoogleAuthenticatedEvent(GoogleAuthenticatedEvent event) {
    if (event.isSuccessful()) {
        Snackbar.make(getView(), R.string.valid_login, Snackbar.LENGTH_SHORT).show();
        bus.post(new UpdateGoogleCredentialsEvent(event.getToken(), event.getTokenSecret(), event.getConsumer(), event.getConsumerSecret()));
    } else {
        Snackbar.make(getView(), R.string.error_login, Snackbar.LENGTH_SHORT).show();
    }
}
Also used : UpdateGoogleCredentialsEvent(io.jawg.osmcontributor.ui.events.login.UpdateGoogleCredentialsEvent) Subscribe(org.greenrobot.eventbus.Subscribe)

Aggregations

UpdateGoogleCredentialsEvent (io.jawg.osmcontributor.ui.events.login.UpdateGoogleCredentialsEvent)1 Subscribe (org.greenrobot.eventbus.Subscribe)1