1
0
Fork 0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2025-10-03 09:49:21 +02:00

Fix compilation error

This commit is contained in:
Isira Seneviratne 2025-09-07 09:54:30 +05:30
parent 0931d44cc1
commit d9a64d9bf0
3 changed files with 8 additions and 14 deletions

View file

@ -96,6 +96,10 @@ enum class EmptyStateSpec(
emojiText = "¯\\_(╹x╹)_/¯", emojiText = "¯\\_(╹x╹)_/¯",
descriptionText = R.string.error_unable_to_load_comments, descriptionText = R.string.error_unable_to_load_comments,
), ),
ErrorLoadingItems(
emojiText = "¯\\_(╹x╹)_/¯",
descriptionText = R.string.error_unable_to_load_items,
),
NoSearchResult( NoSearchResult(
emojiText = "╰(°●°╰)", emojiText = "╰(°●°╰)",
descriptionText = R.string.search_no_results, descriptionText = R.string.search_no_results,

View file

@ -4,7 +4,6 @@ import android.content.res.Configuration
import androidx.compose.material3.Surface import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel import androidx.lifecycle.viewmodel.compose.viewModel
@ -12,7 +11,6 @@ import androidx.paging.PagingData
import androidx.paging.compose.collectAsLazyPagingItems import androidx.paging.compose.collectAsLazyPagingItems
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.flowOf
import org.schabi.newpipe.R
import org.schabi.newpipe.extractor.stream.Description import org.schabi.newpipe.extractor.stream.Description
import org.schabi.newpipe.extractor.stream.StreamInfoItem import org.schabi.newpipe.extractor.stream.StreamInfoItem
import org.schabi.newpipe.extractor.stream.StreamType import org.schabi.newpipe.extractor.stream.StreamType
@ -49,18 +47,10 @@ private fun PlaylistScreen(
) )
} }
is Resource.Loading -> { is Resource.Loading -> LoadingIndicator()
LoadingIndicator()
}
is Resource.Error -> { // TODO use error panel instead
// TODO use error panel instead is Resource.Error -> EmptyStateComposable(EmptyStateSpec.ErrorLoadingItems)
EmptyStateComposable(
EmptyStateSpec.NoVideos.copy(
descriptionText = { stringResource(R.string.error_unable_to_load_streams) },
)
)
}
} }
} }

View file

@ -871,7 +871,7 @@
<string name="migration_info_6_7_message">SoundCloud has discontinued the original Top 50 charts. The corresponding tab has been removed from your main page.</string> <string name="migration_info_6_7_message">SoundCloud has discontinued the original Top 50 charts. The corresponding tab has been removed from your main page.</string>
<string name="auto_queue_description">Next</string> <string name="auto_queue_description">Next</string>
<string name="newpipe_extractor_description">NewPipeExtractor is a library for extracting things from streaming sites. It is a core component of NewPipe, but could be used independently.</string> <string name="newpipe_extractor_description">NewPipeExtractor is a library for extracting things from streaming sites. It is a core component of NewPipe, but could be used independently.</string>
<string name="error_unable_to_load_streams">Could not load streams</string> <string name="error_unable_to_load_items">Could not load items</string>
<string name="playlist_uploader_icon_description">Playlist uploader icon</string> <string name="playlist_uploader_icon_description">Playlist uploader icon</string>
<plurals name="comments"> <plurals name="comments">
<item quantity="one">%d comment</item> <item quantity="one">%d comment</item>