Skip to content

Commit

Permalink
Automatic code reformat (@gsantner)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner committed Nov 14, 2023
1 parent fc7983e commit 3335ce6
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
import android.view.WindowManager;

import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;

import net.gsantner.markor.ApplicationObject;
import net.gsantner.markor.R;
import net.gsantner.markor.model.AppSettings;
import net.gsantner.markor.util.MarkorContextUtils;
import net.gsantner.opoc.frontend.base.GsActivityBase;
import net.gsantner.opoc.util.GsCollectionUtils;

import java.util.List;

public abstract class MarkorBaseActivity extends GsActivityBase<AppSettings, MarkorContextUtils> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import net.gsantner.markor.util.MarkorContextUtils;
import net.gsantner.opoc.format.GsTextUtils;
import net.gsantner.opoc.util.GsCollectionUtils;
import net.gsantner.opoc.util.GsContextUtils;
import net.gsantner.opoc.util.GsFileUtils;
import net.gsantner.opoc.wrapper.GsCallback;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import net.gsantner.markor.frontend.textview.TextViewUtils;
import net.gsantner.markor.model.Document;
import net.gsantner.opoc.util.GsCollectionUtils;
import net.gsantner.opoc.util.GsContextUtils;
import net.gsantner.opoc.util.GsFileUtils;
import net.gsantner.opoc.wrapper.GsCallback;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static String getLinkFormat(final int textFormatId) {
return "{{LINK|TITLE}}";
} else if (textFormatId == FormatRegistry.FORMAT_ASCIIDOC) {
return "link:LINK[TITLE]";
} else{
} else {
return "<a href=\"LINK\">TITLE</a>";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ public static int[] getLineSelection(final CharSequence seq) {
}


/** Get lines of text in which sel[0] -> sel[1] is contained **/
/**
* Get lines of text in which sel[0] -> sel[1] is contained
**/
public static String getSelectedLines(final TextView text, final int... sel) {
return getSelectedLines(text.getText(), sel);
}
Expand All @@ -164,7 +166,9 @@ public static String getSelectedLines(final CharSequence seq) {
return getSelectedLines(seq, getSelection(seq));
}

/** Get lines of text in which sel[0] -> sel[1] is contained **/
/**
* Get lines of text in which sel[0] -> sel[1] is contained
**/
public static String getSelectedLines(final CharSequence seq, final int... sel) {
if (sel == null || sel.length == 0) {
return "";
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/net/gsantner/markor/model/AppSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ public String getShareIntoPrefix() {
return getString(R.string.pref_key__share_into_format, "\\n----\\n{{text}}");
}

public @NonNull File getAttachmentFolder(final File file) {
public @NonNull
File getAttachmentFolder(final File file) {
final File parent = file.getParentFile();
if (parent == null) {
return getNotebookDirectory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import net.gsantner.opoc.wrapper.GsCallback;
import net.gsantner.opoc.wrapper.GsTextWatcherAdapter;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public void onChanged() {
/**
* Show a file in the current folder and blink it
*
* @param file File to blink
* @param file File to blink
*/
private void showAndBlink(final File file) {
final int pos = getFilePosition(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

import android.util.Pair;

import androidx.lifecycle.LifecycleKt;

import net.gsantner.opoc.wrapper.GsCallback;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1736,7 +1736,6 @@ public String extractFileFromIntentStr(final Context context, final Intent recei
* The requested image savepath has to be stored at caller side (not contained in intent),
* it can be retrieved using {@link #extractResultFromActivityResult(Activity, int, int, Intent)}
* returns null if an error happened.
*
*/
public void requestCameraPicture(final Activity activity) {
try {
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/net/gsantner/opoc/util/GsFileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import android.text.TextUtils;
import android.util.Pair;

import androidx.annotation.Nullable;

import net.gsantner.opoc.format.GsTextUtils;

import java.io.BufferedInputStream;
Expand Down Expand Up @@ -701,8 +699,8 @@ public static String getPrefix(final String name) {
* This is highly performant as each file is processed exactly once.
* Inspired by python's sort
*
* @param sortBy String key of what to sort
* @param file The file object to get the
* @param sortBy String key of what to sort
* @param file The file object to get the
* @return A key which can be used for comparisons / sorting
*/
private static String makeSortKey(final String sortBy, final File file) {
Expand Down

0 comments on commit 3335ce6

Please sign in to comment.