Allow close dialog to be shown when tabs icon is pressed
This commit is contained in:
parent
f1467a9a96
commit
000ecbdc25
@ -828,7 +828,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
quit.setOnClickListener(this);
|
||||
}
|
||||
|
||||
private void showCloseDialog(final int position) {
|
||||
@Override
|
||||
public void showCloseDialog(final int position) {
|
||||
if (position < 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -51,4 +51,6 @@ public interface UIController {
|
||||
|
||||
void closeEmptyTab();
|
||||
|
||||
void showCloseDialog(int position);
|
||||
|
||||
}
|
||||
|
@ -167,6 +167,9 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View
|
||||
@Override
|
||||
public void onClick(@NonNull View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.tab_header_button:
|
||||
mUiController.showCloseDialog(tabsManager.indexOfCurrentTab());
|
||||
break;
|
||||
case R.id.new_tab_button:
|
||||
mBus.post(new TabEvents.NewTab());
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user