Merge branch 'main' into main

This commit is contained in:
jhavens1566 2024-09-25 01:30:59 +00:00 committed by GitHub
commit 22b7820ab5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 7 deletions

View file

@ -39,7 +39,7 @@ jobs:
with:
swap-size-gb: 10
- name: Initialize CodeQL
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
- name: Set up JDK 17
@ -53,4 +53,4 @@ jobs:
echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
./gradlew assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8

View file

@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
sarif_file: results.sarif

View file

@ -39,7 +39,7 @@ GEM
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.111.0)
faraday (1.10.3)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)

View file

@ -48,6 +48,8 @@ public abstract class SearchableBaseNoteFragment extends BaseNoteFragment {
private SearchView searchView;
private String searchQuery = null;
private static final int delay = 50; // If the search string does not change after $delay ms, then the search task starts.
private static final int shortStringDelay = 200; // A longer delay for short search strings.
private static final int shortStringSize = 3; // The maximum length of a short search string.
private boolean directEditRemotelyAvailable = false; // avoid using this directly, instead use: isDirectEditEnabled()
@ColorInt
@ -231,8 +233,8 @@ public abstract class SearchableBaseNoteFragment extends BaseNoteFragment {
handler.removeCallbacksAndMessages(null);
}
delayQueryTask = new DelayQueryRunnable(newText);
// If there is only one char in the search pattern, we should start the search immediately.
handler.postDelayed(delayQueryTask, newText.length() > 1 ? delay : 0);
// If there are few chars in the search pattern, we should start the search later.
handler.postDelayed(delayQueryTask, newText.length() > shortStringSize ? delay : shortStringDelay);
}
class DelayQueryRunnable implements Runnable {

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME