Skip to content

Commit

Permalink
Fix some equalities (== instead of ===)
Browse files Browse the repository at this point in the history
These probable typoes have come from JS side.
tuomas2 committed Mar 9, 2023
1 parent 0e508b9 commit 422e557
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -230,7 +230,7 @@ class LinkControl @Inject constructor(
val preferred = preferredKeyType[book.initials] ?: KeyType.KEY

val keyTypes = mutableListOf(preferred)
keyTypes.addAll(KeyType.ALL_TYPES.filterNot { it === preferred })
keyTypes.addAll(KeyType.ALL_TYPES.filterNot { it == preferred })

val k = run {
for(keyType in keyTypes) {
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ open class WindowRepository(val scope: CoroutineScope) {
return newWindow
}

private fun getWindows(state: WindowState)= sortedWindows.filter { it.windowState === state}
private fun getWindows(state: WindowState)= sortedWindows.filter { it.windowState == state}

fun getWindow(windowId: Long?): Window? = if(windowId == null) null else sortedWindows.find {it.id == windowId}

Original file line number Diff line number Diff line change
@@ -570,10 +570,10 @@ class ManageLabels : ListActivityBase() {
isThisBookmarkSelected = data.selectedLabels.contains(label.id)
)
if(isNew) {
if(data.mode === Mode.ASSIGN) {
if(data.mode == Mode.ASSIGN) {
labelData.isThisBookmarkSelected = true
labelData.isThisBookmarkPrimary = true
} else if(data.mode === Mode.WORKSPACE) {
} else if(data.mode == Mode.WORKSPACE) {
labelData.isAutoAssignPrimary = true
labelData.isAutoAssign = true
}
Original file line number Diff line number Diff line change
@@ -93,13 +93,13 @@ class ChooseDictionaryWord : ListActivityBase() {
private fun getEntrySnippet(text: Element, key: String): String {
text.removeChild("title")
val entry = text
?.getChild("entryFree")
if (entry === null) {
.getChild("entryFree")
if (entry == null) {
return cleanUpSnippet(text.value, key);
}

// if a greek or hebrew word, look up any orthographic entries.
var greekOrHebrewWord = entry
val greekOrHebrewWord = entry
.getChildren("orth")
?.map { it.text }
?.filter { it !== "" }
Original file line number Diff line number Diff line change
@@ -179,10 +179,10 @@ class BibleFrame(
return createTextButton(text,
{ v, motionEvent ->
gestureDetector.onTouchEvent(motionEvent)
if (gestureListener.gesturePerformed === GestureType.SINGLE_TAP && (motionEvent.action == MotionEvent.ACTION_UP)) {allViews.showPopupMenu(window, v)}
else if (gestureListener.gesturePerformed === GestureType.LONG_PRESS) {windowControl.minimiseWindow(window)}
else if (gestureListener.gesturePerformed === GestureType.SWIPE_UP) {windowControl.maximiseWindow(window)}
else if (gestureListener.gesturePerformed === GestureType.SWIPE_DOWN) {windowControl.minimiseWindow(window)}
if (gestureListener.gesturePerformed == GestureType.SINGLE_TAP && (motionEvent.action == MotionEvent.ACTION_UP)) {allViews.showPopupMenu(window, v)}
else if (gestureListener.gesturePerformed == GestureType.LONG_PRESS) {windowControl.minimiseWindow(window)}
else if (gestureListener.gesturePerformed == GestureType.SWIPE_UP) {windowControl.maximiseWindow(window)}
else if (gestureListener.gesturePerformed == GestureType.SWIPE_DOWN) {windowControl.minimiseWindow(window)}
true },
window
)

0 comments on commit 422e557

Please sign in to comment.