Fixed warnings and removed unused code
This commit is contained in:
parent
61c4abda5c
commit
1508e27b13
@ -1,5 +1,3 @@
|
|||||||
@file:Suppress("unused")
|
|
||||||
|
|
||||||
package app.git.graph
|
package app.git.graph
|
||||||
|
|
||||||
import org.eclipse.jgit.lib.AnyObjectId
|
import org.eclipse.jgit.lib.AnyObjectId
|
||||||
@ -68,58 +66,6 @@ open class GraphNode(id: AnyObjectId?) : RevCommit(id), IGraphNode {
|
|||||||
return children.size
|
return children.size
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the nth child from this commit's child list.
|
|
||||||
*
|
|
||||||
* @param nth
|
|
||||||
* child index to obtain. Must be in the range 0 through
|
|
||||||
* [.getChildCount]-1.
|
|
||||||
* @return the specified child.
|
|
||||||
* @throws ArrayIndexOutOfBoundsException
|
|
||||||
* an invalid child index was specified.
|
|
||||||
*/
|
|
||||||
fun getChild(nth: Int): GraphNode {
|
|
||||||
return children[nth]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if the given commit is a child (descendant) of this commit.
|
|
||||||
*
|
|
||||||
* @param c
|
|
||||||
* the commit to test.
|
|
||||||
* @return true if the given commit built on top of this commit.
|
|
||||||
*/
|
|
||||||
fun isChild(c: GraphNode): Boolean {
|
|
||||||
for (a in children)
|
|
||||||
if (a === c)
|
|
||||||
return true
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the number of refs for this commit.
|
|
||||||
*
|
|
||||||
* @return number of refs; always a positive value but can be 0.
|
|
||||||
*/
|
|
||||||
fun getRefCount(): Int {
|
|
||||||
return refs.size
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the nth Ref from this commit's ref list.
|
|
||||||
*
|
|
||||||
* @param nth
|
|
||||||
* ref index to obtain. Must be in the range 0 through
|
|
||||||
* [.getRefCount]-1.
|
|
||||||
* @return the specified ref.
|
|
||||||
* @throws ArrayIndexOutOfBoundsException
|
|
||||||
* an invalid ref index was specified.
|
|
||||||
*/
|
|
||||||
fun getRef(nth: Int): Ref {
|
|
||||||
return refs[nth]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
override fun reset() {
|
override fun reset() {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
@file:Suppress("unused")
|
|
||||||
|
|
||||||
package app.git.graph
|
package app.git.graph
|
||||||
|
|
||||||
import org.eclipse.jgit.lib.ObjectId
|
import org.eclipse.jgit.lib.ObjectId
|
||||||
|
@ -91,13 +91,12 @@ fun RepositoryOpenPage(tabViewModel: TabViewModel) {
|
|||||||
when (diffSelected) {
|
when (diffSelected) {
|
||||||
null -> {
|
null -> {
|
||||||
Log(
|
Log(
|
||||||
tabViewModel = tabViewModel,
|
|
||||||
repositoryState = repositoryState,
|
|
||||||
logViewModel = tabViewModel.logViewModel,
|
logViewModel = tabViewModel.logViewModel,
|
||||||
selectedItem = selectedItem,
|
selectedItem = selectedItem,
|
||||||
onItemSelected = {
|
onItemSelected = {
|
||||||
tabViewModel.newSelectedItem(it)
|
tabViewModel.newSelectedItem(it)
|
||||||
},
|
},
|
||||||
|
repositoryState = repositoryState,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
|
||||||
|
|
||||||
package app.ui
|
package app.ui
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
@ -41,7 +39,7 @@ import app.viewmodels.StatusViewModel
|
|||||||
import org.eclipse.jgit.diff.DiffEntry
|
import org.eclipse.jgit.diff.DiffEntry
|
||||||
import org.eclipse.jgit.lib.RepositoryState
|
import org.eclipse.jgit.lib.RepositoryState
|
||||||
|
|
||||||
@OptIn(ExperimentalAnimationApi::class, androidx.compose.ui.ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalAnimationApi::class, ExperimentalComposeUiApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun UncommitedChanges(
|
fun UncommitedChanges(
|
||||||
statusViewModel: StatusViewModel,
|
statusViewModel: StatusViewModel,
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
@file:Suppress("UNUSED_PARAMETER")
|
|
||||||
|
|
||||||
package app.ui.dialogs
|
package app.ui.dialogs
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
@file:OptIn(ExperimentalComposeUiApi::class, ExperimentalFoundationApi::class)
|
@file:OptIn(ExperimentalComposeUiApi::class, ExperimentalFoundationApi::class)
|
||||||
|
|
||||||
@file:Suppress("UNUSED_PARAMETER")
|
|
||||||
|
|
||||||
package app.ui.log
|
package app.ui.log
|
||||||
|
|
||||||
import androidx.compose.foundation.*
|
import androidx.compose.foundation.*
|
||||||
@ -34,7 +32,6 @@ import androidx.compose.ui.unit.Dp
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import app.extensions.*
|
import app.extensions.*
|
||||||
import app.viewmodels.TabViewModel
|
|
||||||
import app.git.graph.GraphNode
|
import app.git.graph.GraphNode
|
||||||
import app.theme.*
|
import app.theme.*
|
||||||
import app.ui.SelectedItem
|
import app.ui.SelectedItem
|
||||||
@ -71,7 +68,6 @@ private const val CANVAS_MIN_WIDTH = 100
|
|||||||
)
|
)
|
||||||
@Composable
|
@Composable
|
||||||
fun Log(
|
fun Log(
|
||||||
tabViewModel: TabViewModel,
|
|
||||||
logViewModel: LogViewModel,
|
logViewModel: LogViewModel,
|
||||||
selectedItem: SelectedItem,
|
selectedItem: SelectedItem,
|
||||||
onItemSelected: (SelectedItem) -> Unit,
|
onItemSelected: (SelectedItem) -> Unit,
|
||||||
|
Loading…
Reference in New Issue
Block a user