1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +00:00

Fixed QR code scanning to add node being broken (fixes #106).

This commit is contained in:
Felix Ableitner 2014-08-29 17:31:32 +03:00
parent 26eb4e6e98
commit feaaf4c5da

View file

@ -3,6 +3,7 @@ package com.nutomic.syncthingandroid.activities;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.View;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.fragments.NodeSettingsFragment;
@ -84,4 +85,15 @@ public class SettingsActivity extends SyncthingActivity {
return getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
}
/**
* Used for the QR code scanner in NodeSettingsFragment.
*
* Instead of the cast, an interface could be used (if there are multiple fragments using this).
*/
public void onClick(View view) {
if (mFragment instanceof NodeSettingsFragment) {
((NodeSettingsFragment) mFragment).onClick(view);
}
}
}