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:
parent
26eb4e6e98
commit
feaaf4c5da
1 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue