-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added the delete message function and fixed bugs and improvements
- Added the delete message function - Added a long press menu to support deleting and reloading messages - Fixed some new chat related issues - Improved the about page - Added beta warning feat: 增加删除消息功能并修复错误和改进 - 新增删除消息功能 - 添加长按菜单,支持删除和重新加载消息 - 修复了一些新聊天相关的问题 - 完善关于页面 - 添加测试版警告 Signed-off-by: gohj99 <[email protected]>
- Loading branch information
Showing
25 changed files
with
711 additions
and
315 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
api_id=YOU_API_ID | ||
api_hash=YOU_API_HASH | ||
BUILD_DATE=2024 | ||
BUILD_DATE=2024 | ||
BETA=false |
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
360 changes: 222 additions & 138 deletions
360
app/src/main/java/com/gohj99/telewatch/ChatActivity.kt
Large diffs are not rendered by default.
Oops, something went wrong.
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,95 @@ | ||
/* | ||
* Copyright (c) 2024 gohj99. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
* Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. | ||
* Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. | ||
* Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. | ||
* Vestibulum commodo. Ut rhoncus gravida arcu. | ||
*/ | ||
|
||
package com.gohj99.telewatch | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.LaunchedEffect | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import com.gohj99.telewatch.ui.CustomButton | ||
import com.gohj99.telewatch.ui.theme.TelewatchTheme | ||
import com.gohj99.telewatch.ui.verticalRotaryScroll | ||
|
||
class IsBetaActivity : ComponentActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
TelewatchTheme { | ||
val scrollState = rememberScrollState() | ||
LaunchedEffect(Unit) { | ||
scrollState.scrollTo(80) | ||
} | ||
|
||
Column( | ||
modifier = Modifier | ||
.fillMaxSize() | ||
.verticalScroll(scrollState) | ||
.verticalRotaryScroll(scrollState), | ||
verticalArrangement = Arrangement.Center, | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
// 标题 | ||
Text( | ||
text = stringResource(id = R.string.Beta_title), | ||
fontSize = 20.sp, | ||
fontWeight = FontWeight.Bold, | ||
color = Color.White, | ||
textAlign = TextAlign.Center, | ||
modifier = Modifier.padding(top = 86.dp) | ||
) | ||
|
||
// 主要说明部分 | ||
Text( | ||
text = stringResource(id = R.string.Beta_description), | ||
fontSize = 16.sp, | ||
color = Color.White, | ||
textAlign = TextAlign.Center, | ||
modifier = Modifier.padding(16.dp) | ||
) | ||
|
||
Spacer(modifier = Modifier.height(16.dp)) | ||
|
||
// 不同意和同意按钮 | ||
Row( | ||
horizontalArrangement = Arrangement.Center, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(bottom = 64.dp, start = 16.dp, end = 16.dp) | ||
) { | ||
CustomButton( | ||
onClick = { | ||
finish() | ||
}, | ||
text = "OK" | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.