Last bits of renaming to FairScan
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.MyScan"
|
||||
android:theme="@style/Theme.FairScan"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.MyScan">
|
||||
android:theme="@style/Theme.FairScan">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
import org.fairscan.app.view.AboutScreen
|
||||
import org.fairscan.app.view.CameraScreen
|
||||
import org.fairscan.app.view.DocumentScreen
|
||||
@@ -84,7 +84,7 @@ class MainActivity : ComponentActivity() {
|
||||
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
val navigation = Navigation(
|
||||
toHomeScreen = { viewModel.navigateTo(Screen.Main.Home) },
|
||||
toCameraScreen = { viewModel.navigateTo(Screen.Main.Camera) },
|
||||
@@ -206,7 +206,7 @@ class MainActivity : ComponentActivity() {
|
||||
) { _, _ -> continuation.resume(Unit) {} }
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("MyScan", "Failed to save PDF", e)
|
||||
Log.e("FairScan", "Failed to save PDF", e)
|
||||
withContext(Dispatchers.Main) {
|
||||
Toast.makeText(context,
|
||||
getString(R.string.error_save), Toast.LENGTH_SHORT).show()
|
||||
|
||||
@@ -279,7 +279,7 @@ class MainViewModel(
|
||||
)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("MyScan", "PDF generation failed", e)
|
||||
Log.e("FairScan", "PDF generation failed", e)
|
||||
_pdfUiState.update {
|
||||
it.copy(
|
||||
isGenerating = false,
|
||||
|
||||
@@ -73,7 +73,7 @@ private val LightColorScheme = lightColorScheme(
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun MyScanTheme(
|
||||
fun FairScanTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
|
||||
@@ -64,7 +64,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.core.net.toUri
|
||||
import org.fairscan.app.BuildConfig
|
||||
import org.fairscan.app.R
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
@@ -261,7 +261,7 @@ fun LicenseBottomSheet(
|
||||
@Preview
|
||||
@Composable
|
||||
fun AboutScreenPreview() {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
AboutScreen(onBack = {}, onViewLibraries = {})
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ import org.fairscan.app.MainViewModel.CaptureState
|
||||
import org.fairscan.app.Navigation
|
||||
import org.fairscan.app.R
|
||||
import org.fairscan.app.Screen
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
|
||||
data class CameraUiState(
|
||||
val pageCount: Int,
|
||||
@@ -169,7 +169,7 @@ fun CameraScreen(
|
||||
isDebugMode),
|
||||
onCapture = {
|
||||
previewView?.bitmap?.let {
|
||||
Log.i("MyScan", "Pressed <Capture>")
|
||||
Log.i("FairScan", "Pressed <Capture>")
|
||||
viewModel.onCapturePressed(it)
|
||||
captureController.takePicture(
|
||||
onImageCaptured = { imageProxy -> viewModel.onImageCaptured(imageProxy) }
|
||||
@@ -448,7 +448,7 @@ fun CameraScreenPreviewInLandscapeMode() {
|
||||
|
||||
@Composable
|
||||
private fun ScreenPreview(captureState: CaptureState, rotationDegrees: Float = 0f) {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
val thumbnailCoords = remember { mutableStateOf(Offset.Zero) }
|
||||
CameraScreenScaffold(
|
||||
cameraPreview = {
|
||||
|
||||
@@ -56,7 +56,7 @@ import net.engawapg.lib.zoomable.ZoomState
|
||||
import net.engawapg.lib.zoomable.zoomable
|
||||
import org.fairscan.app.Navigation
|
||||
import org.fairscan.app.R
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
@@ -223,7 +223,7 @@ private fun BottomBar(
|
||||
@Composable
|
||||
@Preview
|
||||
fun DocumentScreenPreview() {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
DocumentScreen(
|
||||
fakeDocument(
|
||||
listOf(1, 2, 2, 2).map { "gallica.bnf.fr-bpt6k5530456s-$it.jpg" },
|
||||
|
||||
@@ -71,7 +71,7 @@ import org.fairscan.app.Navigation
|
||||
import org.fairscan.app.PdfGenerationActions
|
||||
import org.fairscan.app.R
|
||||
import org.fairscan.app.ui.PdfGenerationUiState
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
@@ -429,7 +429,7 @@ fun PreviewExportScreenAfterSaveHorizontal() {
|
||||
|
||||
@Composable
|
||||
fun ExportPreviewToCustomize(uiState: PdfGenerationUiState) {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
ExportScreen(
|
||||
filename = remember { mutableStateOf("Scan 2025-07-02 17.40.42") },
|
||||
onFilenameChange = {_->},
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.fairscan.app.Navigation
|
||||
import org.fairscan.app.R
|
||||
import org.fairscan.app.rememberCameraPermissionState
|
||||
import org.fairscan.app.ui.RecentDocumentUiState
|
||||
import org.fairscan.app.ui.theme.MyScanTheme
|
||||
import org.fairscan.app.ui.theme.FairScanTheme
|
||||
import java.io.File
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -265,7 +265,7 @@ private fun RecentDocumentList(
|
||||
@Preview
|
||||
@Composable
|
||||
fun HomeScreenPreviewOnFirstLaunch() {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
HomeScreen(
|
||||
cameraPermission = rememberCameraPermissionState(),
|
||||
currentDocument = fakeDocument(),
|
||||
@@ -280,7 +280,7 @@ fun HomeScreenPreviewOnFirstLaunch() {
|
||||
@Preview
|
||||
@Composable
|
||||
fun HomeScreenPreviewWithCurrentDocument() {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
HomeScreen(
|
||||
cameraPermission = rememberCameraPermissionState(),
|
||||
currentDocument = fakeDocument(
|
||||
@@ -297,7 +297,7 @@ fun HomeScreenPreviewWithCurrentDocument() {
|
||||
@Preview
|
||||
@Composable
|
||||
fun HomeScreenPreviewWithLastSavedFiles() {
|
||||
MyScanTheme {
|
||||
FairScanTheme {
|
||||
HomeScreen(
|
||||
cameraPermission = rememberCameraPermissionState(),
|
||||
currentDocument = fakeDocument(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.MyScan" parent="android:Theme.Material.Light.NoActionBar" />
|
||||
<style name="Theme.FairScan" parent="android:Theme.Material.Light.NoActionBar" />
|
||||
</resources>
|
||||
Reference in New Issue
Block a user