-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added new search result item composable and improved search exp…
…erience (#30)
- Loading branch information
Showing
35 changed files
with
986 additions
and
167 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
app/schemas/com.rob729.newsfeed.database.NewsDatabase/2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 2, | ||
"identityHash": "20866458d27e519b9d62fabf4e9427b0", | ||
"entities": [ | ||
{ | ||
"tableName": "news_source_table", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `news_source_domain` TEXT NOT NULL, `news_article` TEXT NOT NULL, `news_source_fetch_time` INTEGER NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "newsSourceDomain", | ||
"columnName": "news_source_domain", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "newsArticle", | ||
"columnName": "news_article", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "newsSourceFetchTimeInMillis", | ||
"columnName": "news_source_fetch_time", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '20866458d27e519b9d62fabf4e9427b0')" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/rob729/newsfeed/ui/components/CommonComponents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.rob729.newsfeed.ui.components | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.Schedule | ||
import androidx.compose.material.icons.filled.Share | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.platform.LocalContext | ||
import androidx.compose.ui.unit.dp | ||
|
||
@Composable | ||
fun ShareIcon(modifier: Modifier = Modifier, shareUrl: String) { | ||
val context = LocalContext.current | ||
Icon( | ||
imageVector = Icons.Filled.Share, | ||
contentDescription = "share", | ||
modifier | ||
.size(14.dp) | ||
.clickable { shareArticle(context, shareUrl) } | ||
) | ||
} | ||
|
||
@Composable | ||
fun TimeIcon(modifier: Modifier = Modifier) { | ||
Icon( | ||
imageVector = Icons.Default.Schedule, contentDescription = "time", | ||
modifier | ||
.size(14.dp) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
app/src/main/java/com/rob729/newsfeed/ui/components/LoadingShimmer.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.