Skip to content

Commit 3ab1322

Browse files
committed
test,ui: move comment error tests to error; remove unused ComposeView
1 parent fab0d35 commit 3ab1322

4 files changed

Lines changed: 5 additions & 15 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ app/release/
1919
bin/
2020
.vscode/
2121
*.code-workspace
22+
23+
# logs
24+
*.log

app/src/androidTest/java/org/schabi/newpipe/ui/components/common/CommentSectionErrorTest.kt renamed to app/src/androidTest/java/org/schabi/newpipe/error/ErrorInfoCommentsTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.schabi.newpipe.ui.components.common
1+
package org.schabi.newpipe.error
22

33
import android.content.Context
44
import androidx.test.core.app.ApplicationProvider
@@ -7,14 +7,12 @@ import org.junit.Assert
77
import org.junit.Test
88
import org.junit.runner.RunWith
99
import org.schabi.newpipe.R
10-
import org.schabi.newpipe.error.ErrorInfo
11-
import org.schabi.newpipe.error.UserAction
1210
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException
1311
import java.io.IOException
1412
import java.net.SocketTimeoutException
1513

1614
@RunWith(AndroidJUnit4::class)
17-
class CommentSectionErrorTest {
15+
class ErrorInfoCommentsTest {
1816
private val context: Context by lazy { ApplicationProvider.getApplicationContext<Context>() }
1917
// Test 1: Network error on initial load (Resource.Error)
2018
@Test

app/src/main/java/org/schabi/newpipe/ui/components/video/comment/CommentSection.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import androidx.compose.runtime.getValue
1616
import androidx.compose.ui.Alignment
1717
import androidx.compose.ui.Modifier
1818
import androidx.compose.ui.input.nestedscroll.nestedScroll
19-
import androidx.compose.ui.platform.LocalContext
2019
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
2120
import androidx.compose.ui.res.pluralStringResource
2221
import androidx.compose.ui.tooling.preview.Preview
@@ -57,7 +56,6 @@ private fun CommentSection(
5756
val comments = commentsFlow.collectAsLazyPagingItems()
5857
val nestedScrollInterop = rememberNestedScrollInteropConnection()
5958
val state = rememberLazyListState()
60-
val context = LocalContext.current
6159

6260
LazyColumnThemedScrollbar(state = state) {
6361
LazyColumn(

app/src/main/res/layout/fragment_video_detail.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,6 @@
214214
android:layout_marginTop="@dimen/video_item_detail_error_panel_margin"
215215
android:visibility="gone"
216216
tools:visibility="gone" />
217-
<androidx.compose.ui.platform.ComposeView
218-
android:id="@+id/compose_error_panel"
219-
android:layout_width="match_parent"
220-
android:layout_height="wrap_content"
221-
android:layout_below="@id/detail_title_root_layout"
222-
android:layout_marginTop="@dimen/video_item_detail_error_panel_margin"
223-
android:visibility="gone"
224-
/>
225-
226217
<!--HIDING ROOT-->
227218
<LinearLayout
228219
android:id="@+id/detail_content_root_hiding"

0 commit comments

Comments
 (0)