Skip to content

Commit

Permalink
Reformat code, by @gsantner
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner committed Jan 4, 2022
1 parent 0c27e81 commit 2e0b788
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.text.Html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ private static File getIntentDir(final Intent intent, final File fallback) {
if (dir.exists() && dir.isDirectory()) {
return dir;
}
} catch (NullPointerException ignored) {};
} catch (NullPointerException ignored) {
}

return fallback;
}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/net/gsantner/markor/model/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ public Document(@NonNull final File file) {
}

public String getPath() {
return _path;
return _path;
}

public @NonNull File getFile() {
public @NonNull
File getFile() {
return _file;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void setNotesLastDirectory(File notesLastDirectory) {
private boolean notChild(final File a, final File b) {
try {
return b.equals(a) || !b.getParentFile().getCanonicalPath().startsWith(a.getCanonicalPath());
} catch(IOException e) {
} catch (IOException e) {
return false; // Not sure, return false for safety
}
}
Expand Down Expand Up @@ -134,7 +134,7 @@ public void moveOrCopySelected(final List<File> files, final File destDir, final
if (destDir.isDirectory()) {
boolean allSane = true;
for (final File file : files) {
final File dest = new File(destDir, file.getName());
final File dest = new File(destDir, file.getName());
allSane &= isMove ? saneMove(file, dest) : saneCopy(file, dest);
}
if (allSane) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import net.gsantner.markor.R;
import net.gsantner.markor.format.TextFormat;
import net.gsantner.markor.format.markdown.MarkdownTextConverter;
import net.gsantner.markor.model.Document;
import net.gsantner.markor.ui.FilesystemViewerCreator;
import net.gsantner.markor.util.AppSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import android.widget.RemoteViews;

import net.gsantner.markor.R;
import net.gsantner.markor.activity.openeditor.OpenEditorFromShortcutOrWidgetActivity;
import net.gsantner.markor.activity.MainActivity;
import net.gsantner.markor.activity.openeditor.OpenEditorFromShortcutOrWidgetActivity;
import net.gsantner.markor.model.Document;
import net.gsantner.markor.util.AppSettings;

Expand Down Expand Up @@ -106,9 +106,9 @@ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] a

// ListView
final Intent notesListIntent = new Intent(context, WrFilesWidgetService.class)
.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId)
.putExtra(Document.EXTRA_PATH, directoryF)
.putExtra(Document.EXTRA_PATH_IS_FOLDER, true);
.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId)
.putExtra(Document.EXTRA_PATH, directoryF)
.putExtra(Document.EXTRA_PATH_IS_FOLDER, true);
notesListIntent.setData(Uri.parse(notesListIntent.toUri(Intent.URI_INTENT_SCHEME)));

views.setEmptyView(R.id.widget_list_container, R.id.widget_empty_hint);
Expand Down

0 comments on commit 2e0b788

Please sign in to comment.