Skip to content

Commit

Permalink
fix: Some bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxGalaxy committed Aug 13, 2023
1 parent 8dad922 commit 06adec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,18 @@ public boolean onMenuItemClick(MenuItem menuItem) {
if (fileTabData.size() != 0) {
if (positionOfCloser == 0) {
activity.adapter.setActiveTab(positionOfCloser);
activity.save();
activity.openFileInEditor(
new File(fileTabData.get(positionOfCloser).filePath));
} else {
if (positionOfCloser + 1 > fileTabData.size()) {
activity.adapter.setActiveTab(positionOfCloser - 1);
activity.save();
activity.openFileInEditor(
new File(fileTabData.get(positionOfCloser - 1).filePath));
} else {
activity.adapter.setActiveTab(positionOfCloser);
activity.save();
activity.openFileInEditor(
new File(fileTabData.get(positionOfCloser).filePath));
}
Expand All @@ -123,6 +126,7 @@ public boolean onMenuItemClick(MenuItem menuItem) {
.getTitle()
.toString()
.equals(activity.getString(R.string.close_all))) {
activity.save();
fileTabData.clear();
activeTab = 0;
activity.adapter.notifyDataSetChanged();
Expand Down

0 comments on commit 06adec6

Please sign in to comment.