style: 去除所有文件标头中的Description Tag

This commit is contained in:
糕小菜 2024-10-23 17:22:45 +08:00
parent a2d4513e57
commit eb94db1fe3
47 changed files with 6 additions and 49 deletions

View File

@ -12,7 +12,6 @@ import io.objectbox.android.Admin;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/4 10:37 * @Date: 2024/5/4 10:37
* @Description: 应用程序application类
*/ */
public class KchatApplication extends Application { public class KchatApplication extends Application {
private static KchatApplication instance; private static KchatApplication instance;

View File

@ -8,7 +8,6 @@ import io.objectbox.annotation.Id;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/23 13:51 * @Date: 2024/5/23 13:51
* @Description: TODO
*/ */
@Entity @Entity
public class ChatLists { public class ChatLists {

View File

@ -6,7 +6,6 @@ import io.objectbox.annotation.Id;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/23 13:38 * @Date: 2024/5/23 13:38
* @Description: TODO
*/ */
@Entity @Entity
public class Messages { public class Messages {

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/16 13:36 * @Date: 2024/10/16 13:36
* @Description: TODO
*/ */
data class HomeItem( data class HomeItem(
val name: String, val name: String,

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/14 14:30 * @Date: 2024/10/14 14:30
* @Description: TODO
*/ */
@Serializable @Serializable

View File

@ -7,7 +7,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/18 15:11 * @Date: 2024/10/18 15:11
* @Description: TODO
*/ */
@Serializable @Serializable
data class FriendRequestItem( data class FriendRequestItem(

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/17 22:00 * @Date: 2024/10/17 22:00
* @Description: TODO
*/ */
@Serializable @Serializable

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model.search
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/9/22 22:59 * @Date: 2024/9/22 22:59
* @Description: TODO
*/ */
data class SearchFriends( data class SearchFriends(
val code: String, val code: String,

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model.search
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/16 13:32 * @Date: 2024/10/16 13:32
* @Description: TODO
*/ */
data class SearchItem( data class SearchItem(
val avatarUrl: String, val avatarUrl: String,

View File

@ -6,7 +6,6 @@ import android.os.Parcelable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/9/22 22:58 * @Date: 2024/9/22 22:58
* @Description: 用户详细资料实体类
*/ */
data class User( data class User(
val username: String, val username: String,

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model.setting
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/9 20:35 * @Date: 2024/10/9 20:35
* @Description: TODO
*/ */
data class FunctionItem( data class FunctionItem(
val itemName: String, val itemName: String,

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model.setting
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/9 20:33 * @Date: 2024/10/9 20:33
* @Description: TODO
*/ */
data class NormalItem( data class NormalItem(
val name: String, val name: String,

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.model.setting
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/8 13:53 * @Date: 2024/10/8 13:53
* @Description: TODO
*/ */
sealed class SettingItem { sealed class SettingItem {
data class NormalItem( data class NormalItem(

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/16 13:35 * @Date: 2024/10/16 13:35
* @Description: TODO
*/ */
@Serializable @Serializable

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/16 13:33 * @Date: 2024/10/16 13:33
* @Description: TODO
*/ */
@Serializable @Serializable

View File

@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/16 13:34 * @Date: 2024/10/16 13:34
* @Description: TODO
*/ */
@Serializable @Serializable

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.network
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/14 13:46 * @Date: 2024/10/14 13:46
* @Description: 网络接口类
*/ */
object NetworkInterface { object NetworkInterface {

View File

@ -12,7 +12,6 @@ import okhttp3.RequestBody.Companion.toRequestBody
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/14 13:52 * @Date: 2024/10/14 13:52
* @Description: 封装okhttp进行网络请求
*/ */
class NetworkRequest { class NetworkRequest {

View File

@ -5,7 +5,6 @@ import okhttp3.OkHttpClient
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/27 8:58 * @Date: 2024/5/27 8:58
* @Description: 使用单例模式的okhttp实例类
*/ */
object OkhttpHelper { object OkhttpHelper {
private var client: OkHttpClient? = null private var client: OkHttpClient? = null

View File

@ -21,7 +21,6 @@ import java.io.IOException
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/20 17:32 * @Date: 2024/10/20 17:32
* @Description: 联系人相关模块网络请求Repo类
*/ */
class ContactRepo { class ContactRepo {
@ -76,8 +75,7 @@ class ContactRepo {
} }
override fun onResponse(call: Call, response: Response) { override fun onResponse(call: Call, response: Response) {
if (response.isSuccessful && response.body != null) { response.body?.string()?.let { responseBody ->
val responseBody = response.body!!.string()
val contactResponse = val contactResponse =
Json.decodeFromString<AcceptContactRequest>(responseBody) Json.decodeFromString<AcceptContactRequest>(responseBody)
acceptFriendMutableLiveData.postValue(contactResponse) acceptFriendMutableLiveData.postValue(contactResponse)
@ -100,6 +98,11 @@ class ContactRepo {
NetworkRequest().postAsync(SERVER_URL + ADD_FRIEND, requestBody, object : Callback { NetworkRequest().postAsync(SERVER_URL + ADD_FRIEND, requestBody, object : Callback {
override fun onResponse(call: Call, response: Response) { override fun onResponse(call: Call, response: Response) {
response.body?.string()?.let { responseBody ->
val applyFriend =
Json.decodeFromString<ApplyFriend>(responseBody)
mutableLiveData.postValue(applyFriend)
}
if (response.isSuccessful && response.body != null) { if (response.isSuccessful && response.body != null) {
val responseBody = response.body!!.string() val responseBody = response.body!!.string()
val applyFriend = val applyFriend =

View File

@ -16,7 +16,6 @@ import java.io.IOException
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/17 21:53 * @Date: 2024/10/17 21:53
* @Description: TODO
*/ */
class FriendListRepo { class FriendListRepo {
fun getFriendList(username: String): MutableLiveData<List<FriendItem>?> { fun getFriendList(username: String): MutableLiveData<List<FriendItem>?> {

View File

@ -19,7 +19,6 @@ import okhttp3.Response;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/6/1 20:53 * @Date: 2024/6/1 20:53
* @Description: TODO
*/ */
public class SearchFriendsRepository { public class SearchFriendsRepository {
public MutableLiveData<SearchFriends> searchFriends(String username) { public MutableLiveData<SearchFriends> searchFriends(String username) {

View File

@ -19,7 +19,6 @@ import okhttp3.Response;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/6/13 12:34 * @Date: 2024/6/13 12:34
* @Description: TODO
*/ */
public class UserRepository { public class UserRepository {
public MutableLiveData<UserList> getUserListByNickname(String username) { public MutableLiveData<UserList> getUserListByNickname(String username) {

View File

@ -7,7 +7,6 @@ import com.tencent.mmkv.MMKV;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/8/18 13:18 * @Date: 2024/8/18 13:18
* @Description: TODO
*/ */
public class ConstantsUtil { public class ConstantsUtil {
public static int getKeyboardHeight() { public static int getKeyboardHeight() {

View File

@ -7,7 +7,6 @@ import android.graphics.drawable.GradientDrawable;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/8/14 19:22 * @Date: 2024/8/14 19:22
* @Description: TODO
*/ */
public class DrawableUtil { public class DrawableUtil {
public static GradientDrawable createDrawable(Integer color, int radius) { public static GradientDrawable createDrawable(Integer color, int radius) {

View File

@ -20,7 +20,6 @@ import java.util.regex.Pattern;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/30 19:47 * @Date: 2024/5/30 19:47
* @Description: TODO
*/ */
public class ImageSpanUtil { public class ImageSpanUtil {

View File

@ -7,7 +7,6 @@ import androidx.appcompat.app.AppCompatActivity
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/21 22:32 * @Date: 2024/10/21 22:32
* @Description: TODO
*/ */
open class BaseActivity : AppCompatActivity() { open class BaseActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {

View File

@ -41,7 +41,6 @@ import io.objectbox.Box;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/26 10:02 * @Date: 2024/5/26 10:02
* @Description: 应用的主活动
*/ */
public class MainActivity extends AppCompatActivity implements OnChatListItemClickListener { public class MainActivity extends AppCompatActivity implements OnChatListItemClickListener {
private ActivityMainBinding binding; private ActivityMainBinding binding;

View File

@ -33,7 +33,6 @@ import io.objectbox.Box;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/4 22:48 * @Date: 2024/5/4 22:48
* @Description: TODO
*/ */
public class ChatAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public class ChatAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final LinkedList<Messages> messages; private final LinkedList<Messages> messages;

View File

@ -27,7 +27,6 @@ import java.util.List;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/20 10:13 * @Date: 2024/5/20 10:13
* @Description: TODO
*/ */
public class ChatListAdapter extends RecyclerView.Adapter<ChatListAdapter.MyViewHolder> { public class ChatListAdapter extends RecyclerView.Adapter<ChatListAdapter.MyViewHolder> {
private final List<ChatLists> chatLists; private final List<ChatLists> chatLists;

View File

@ -18,7 +18,6 @@ import java.util.List;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/30 16:51 * @Date: 2024/5/30 16:51
* @Description: TODO
*/ */
public class EmojiAdapter extends RecyclerView.Adapter<EmojiAdapter.MyViewHolder> { public class EmojiAdapter extends RecyclerView.Adapter<EmojiAdapter.MyViewHolder> {

View File

@ -14,7 +14,6 @@ import com.kaixed.kchat.view.activity.ChatActivity
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/14 14:47 * @Date: 2024/10/14 14:47
* @Description: TODO
*/ */
class FriendListAdapter(private val items: MutableList<FriendItem>, private val context: Context) : class FriendListAdapter(private val items: MutableList<FriendItem>, private val context: Context) :
RecyclerView.Adapter<FriendListAdapter.MyViewHolder>() { RecyclerView.Adapter<FriendListAdapter.MyViewHolder>() {

View File

@ -13,7 +13,6 @@ import java.util.List;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/8/16 20:53 * @Date: 2024/8/16 20:53
* @Description: TODO
*/ */
public class FunctionPanelAdapter extends BaseAdapter { public class FunctionPanelAdapter extends BaseAdapter {

View File

@ -17,7 +17,6 @@ import com.kaixed.kchat.view.activity.ApproveDetailActivity
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/18 15:08 * @Date: 2024/10/18 15:08
* @Description: 好友通知列表的适配器类
*/ */
class MessageListAdapter(private val items: MutableList<FriendRequestItem>, val context: Context) : class MessageListAdapter(private val items: MutableList<FriendRequestItem>, val context: Context) :
RecyclerView.Adapter<MessageListAdapter.MyViewHolder>() { RecyclerView.Adapter<MessageListAdapter.MyViewHolder>() {

View File

@ -17,7 +17,6 @@ import java.util.List;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/8/12 20:25 * @Date: 2024/8/12 20:25
* @Description: 搜索结果的Adapter
*/ */
public class SearchResultAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public class SearchResultAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

View File

@ -17,7 +17,6 @@ import com.kaixed.kchat.utils.Constants.MESSAGE_TYPE_TITLE
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/8 13:53 * @Date: 2024/10/8 13:53
* @Description: TODO
*/ */
class SettingListAdapter(private val items: MutableList<SettingItem>) : class SettingListAdapter(private val items: MutableList<SettingItem>) :
RecyclerView.Adapter<ViewHolder>() { RecyclerView.Adapter<ViewHolder>() {

View File

@ -3,7 +3,6 @@ package com.kaixed.kchat.view.i;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/6/16 19:28 * @Date: 2024/6/16 19:28
* @Description: TODO
*/ */
public interface OnChatListItemClickListener { public interface OnChatListItemClickListener {
void onItemClick(String username); void onItemClick(String username);

View File

@ -17,7 +17,6 @@ import com.kaixed.kchat.view.activity.ProfileDetailActivity
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/10 22:28 * @Date: 2024/10/10 22:28
* @Description: 自定义Item控件以便于复用以减少重复代码
*/ */
class CustomItem @JvmOverloads constructor( class CustomItem @JvmOverloads constructor(
context: Context, context: Context,

View File

@ -12,7 +12,6 @@ import com.kaixed.kchat.databinding.PreferenceCategoryCustomLayoutBinding
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/10 14:45 * @Date: 2024/10/10 14:45
* @Description: TODO
*/ */
class CustomPreferenceCategory @JvmOverloads constructor( class CustomPreferenceCategory @JvmOverloads constructor(
context: Context, context: Context,

View File

@ -13,7 +13,6 @@ import com.kaixed.kchat.databinding.ViewTitleBarBinding
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/10 22:13 * @Date: 2024/10/10 22:13
* @Description: 自定义标题栏控件
*/ */
class CustomTitleBar @JvmOverloads constructor( class CustomTitleBar @JvmOverloads constructor(
context: Context, context: Context,

View File

@ -5,7 +5,6 @@ import androidx.lifecycle.ViewModel;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/6/1 20:52 * @Date: 2024/6/1 20:52
* @Description: TODO
*/ */
public class AddFriendViewModel extends ViewModel { public class AddFriendViewModel extends ViewModel {

View File

@ -8,7 +8,6 @@ import com.kaixed.kchat.repository.ContactRepo
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/15 17:29 * @Date: 2024/10/15 17:29
* @Description: TODO
*/ */
class ApplyFriendViewModel : ViewModel() { class ApplyFriendViewModel : ViewModel() {
private var contactRepo: ContactRepo = ContactRepo() private var contactRepo: ContactRepo = ContactRepo()

View File

@ -13,7 +13,6 @@ import com.kaixed.kchat.repository.SearchFriendsRepository
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/20 17:40 * @Date: 2024/10/20 17:40
* @Description: TODO
*/ */
class ContactViewModel : ViewModel() { class ContactViewModel : ViewModel() {
private val contactRepo = ContactRepo() private val contactRepo = ContactRepo()

View File

@ -6,7 +6,6 @@ import com.kaixed.kchat.repository.FriendListRepo
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/10/17 22:02 * @Date: 2024/10/17 22:02
* @Description: TODO
*/ */
class FriendListViewModel : ViewModel() { class FriendListViewModel : ViewModel() {
private val friendListRepo = FriendListRepo() private val friendListRepo = FriendListRepo()

View File

@ -9,7 +9,6 @@ import com.kaixed.kchat.repository.LoginRepository;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/5/27 9:29 * @Date: 2024/5/27 9:29
* @Description: TODO
*/ */
public class LoginViewModel extends ViewModel { public class LoginViewModel extends ViewModel {
private final LoginRepository loginRepository; private final LoginRepository loginRepository;

View File

@ -8,7 +8,6 @@ import com.kaixed.kchat.repository.SearchFriendsRepository
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/9/22 23:04 * @Date: 2024/9/22 23:04
* @Description: TODO
*/ */
class SearchFriendsViewModel : ViewModel() { class SearchFriendsViewModel : ViewModel() {
private var searchFriendsRepo: SearchFriendsRepository = SearchFriendsRepository() private var searchFriendsRepo: SearchFriendsRepository = SearchFriendsRepository()

View File

@ -9,7 +9,6 @@ import com.kaixed.kchat.repository.UserRepository;
/** /**
* @Author: kaixed * @Author: kaixed
* @Date: 2024/6/13 12:49 * @Date: 2024/6/13 12:49
* @Description: TODO
*/ */
public class UserViewModel extends ViewModel { public class UserViewModel extends ViewModel {
private final UserRepository userRepository; private final UserRepository userRepository;