mirror of https://github.com/NekoX-Dev/NekoX.git
Refinds
This commit is contained in:
parent
ee5d3fa381
commit
97ef5f33e2
|
@ -1,63 +0,0 @@
|
||||||
name: Dev Branch Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '.github/**'
|
|
||||||
- '!.github/workflows/**'
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
canaryBuild:
|
|
||||||
name: Canary Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "!contains(github.event.head_commit.message, '[s]')"
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.gradle
|
|
||||||
key: gradle-${{ hashFiles('**/*.gradle') }}
|
|
||||||
- uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 1.8
|
|
||||||
- name: Run Gradle Build
|
|
||||||
run: |
|
|
||||||
sudo bash <<EOF
|
|
||||||
[ -d "$HOME/.gradle" ] && mv $HOME/.gradle /root
|
|
||||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
|
||||||
./gradlew assembleFullRelease
|
|
||||||
mv /root/.gradle $HOME
|
|
||||||
chgrp -R $UID $HOME/.gradle
|
|
||||||
chown -R $UID $HOME/.gradle
|
|
||||||
EOF
|
|
||||||
echo ::set-env name=APK_FILE::$(find TMessagesProj/build/outputs/apk -name "*arm64-v8a*.apk")
|
|
||||||
echo ::set-env name=APK_FILE_ARMV7::$(find TMessagesProj/build/outputs/apk -name "*armeabi*.apk")
|
|
||||||
echo ::set-env name=APK_FILE_X86::$(find TMessagesProj/build/outputs/apk -name "*x86-*.apk")
|
|
||||||
echo ::set-env name=APK_FILE_X64::$(find TMessagesProj/build/outputs/apk -name "*x86_64*.apk")
|
|
||||||
- name: Upload Canary Apk
|
|
||||||
uses: appleboy/telegram-action@master
|
|
||||||
with:
|
|
||||||
to: ${{ secrets.CANARY_CHANNEL }}
|
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
||||||
document: ${{ env.APK_FILE }}
|
|
||||||
- name: Upload Canary Apk ( armv7 )
|
|
||||||
uses: appleboy/telegram-action@master
|
|
||||||
with:
|
|
||||||
to: ${{ secrets.CANARY_CHANNEL }}
|
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
||||||
document: ${{ env.APK_FILE_ARMV7 }}
|
|
||||||
- name: Upload Canary Apk ( x86 )
|
|
||||||
uses: appleboy/telegram-action@master
|
|
||||||
with:
|
|
||||||
to: ${{ secrets.CANARY_CHANNEL }}
|
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
||||||
document: ${{ env.APK_FILE_X86 }}
|
|
||||||
- name: Upload Canary Apk ( x64 )
|
|
||||||
uses: appleboy/telegram-action@master
|
|
||||||
with:
|
|
||||||
to: ${{ secrets.CANARY_CHANNEL }}
|
|
||||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
|
||||||
document: ${{ env.APK_FILE_X64 }}
|
|
|
@ -907,9 +907,9 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||||
}
|
}
|
||||||
if (setAvatarCell != null) {
|
if (setAvatarCell != null) {
|
||||||
if (hasPhoto || imageUpdater.isUploadingImage()) {
|
if (hasPhoto || imageUpdater.isUploadingImage()) {
|
||||||
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetNewPhoto", R.string.ChatSetNewPhoto), R.drawable.menu_camera2, true);
|
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetNewPhoto", R.string.ChatSetNewPhoto), R.drawable.baseline_image_24, true);
|
||||||
} else {
|
} else {
|
||||||
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetPhotoOrVideo", R.string.ChatSetPhotoOrVideo), R.drawable.menu_camera2, true);
|
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetPhotoOrVideo", R.string.ChatSetPhotoOrVideo), R.drawable.baseline_image_24, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PhotoViewer.hasInstance() && PhotoViewer.getInstance().isVisible()) {
|
if (PhotoViewer.hasInstance() && PhotoViewer.getInstance().isVisible()) {
|
||||||
|
@ -974,7 +974,7 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||||
showAvatarProgress(false, true);
|
showAvatarProgress(false, true);
|
||||||
} else {
|
} else {
|
||||||
avatarImage.setImage(ImageLocation.getForLocal(avatar), "50_50", avatarDrawable, currentChat);
|
avatarImage.setImage(ImageLocation.getForLocal(avatar), "50_50", avatarDrawable, currentChat);
|
||||||
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetNewPhoto", R.string.ChatSetNewPhoto), R.drawable.menu_camera2, true);
|
setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetNewPhoto", R.string.ChatSetNewPhoto), R.drawable.baseline_image_24, true);
|
||||||
showAvatarProgress(true, false);
|
showAvatarProgress(true, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -2308,18 +2308,30 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||||
openAddMember();
|
openAddMember();
|
||||||
} else if (position == usernameRow) {
|
} else if (position == usernameRow) {
|
||||||
if (currentChat != null) {
|
if (currentChat != null) {
|
||||||
try {
|
|
||||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
BottomBuilder builder = new BottomBuilder(getParentActivity());
|
||||||
intent.setType("text/plain");
|
builder.addTitle("@" + currentChat.username);
|
||||||
if (!TextUtils.isEmpty(chatInfo.about)) {
|
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, currentChat.title + "\n" + chatInfo.about + "\nhttps://" + getMessagesController().linkPrefix + "/" + currentChat.username);
|
if (chatInfo != null && chatInfo.can_set_username) {
|
||||||
} else {
|
builder.addItem(LocaleController.getString("Edit", R.string.Edit), R.drawable.baseline_edit_24, __ -> {
|
||||||
intent.putExtra(Intent.EXTRA_TEXT, currentChat.title + "\nhttps://" + getMessagesController().linkPrefix + "/" + currentChat.username);
|
ChatEditTypeActivity fragment = new ChatEditTypeActivity(chat_id, chatInfo.can_set_location);
|
||||||
}
|
fragment.setInfo(chatInfo);
|
||||||
getParentActivity().startActivityForResult(Intent.createChooser(intent, LocaleController.getString("BotShare", R.string.BotShare)), 500);
|
presentFragment(fragment);
|
||||||
} catch (Exception e) {
|
return Unit.INSTANCE;
|
||||||
FileLog.e(e);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
builder.addItem(LocaleController.getString("Copy", R.string.Copy), R.drawable.baseline_content_copy_24, __ -> {
|
||||||
|
AlertUtil.copyAndAlert("@" + currentChat.username);
|
||||||
|
return Unit.INSTANCE;
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.addItem(LocaleController.getString("CopyLink", R.string.CopyLink), R.drawable.baseline_link_24, __ -> {
|
||||||
|
AlertUtil.copyAndAlert("https://t.me/" + currentChat.username);
|
||||||
|
return Unit.INSTANCE;
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
}
|
}
|
||||||
} else if (position == locationRow) {
|
} else if (position == locationRow) {
|
||||||
if (chatInfo.location instanceof TLRPC.TL_channelLocation) {
|
if (chatInfo.location instanceof TLRPC.TL_channelLocation) {
|
||||||
|
@ -6124,7 +6136,12 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||||
detailCell.setTextAndValue(text, LocaleController.getString("Username", R.string.Username), false);
|
detailCell.setTextAndValue(text, LocaleController.getString("Username", R.string.Username), false);
|
||||||
} else if (currentChat != null) {
|
} else if (currentChat != null) {
|
||||||
TLRPC.Chat chat = getMessagesController().getChat(chat_id);
|
TLRPC.Chat chat = getMessagesController().getChat(chat_id);
|
||||||
detailCell.setTextAndValue(getMessagesController().linkPrefix + "/" + chat.username, LocaleController.getString("InviteLink", R.string.InviteLink), false);
|
if (chat != null && !TextUtils.isEmpty(chat.username)) {
|
||||||
|
text = "@" + chat.username;
|
||||||
|
} else {
|
||||||
|
text = "-";
|
||||||
|
}
|
||||||
|
detailCell.setTextAndValue(text, LocaleController.getString("Username", R.string.Username), false);
|
||||||
}
|
}
|
||||||
} else if (position == locationRow) {
|
} else if (position == locationRow) {
|
||||||
if (chatInfo != null && chatInfo.location instanceof TLRPC.TL_channelLocation) {
|
if (chatInfo != null && chatInfo.location instanceof TLRPC.TL_channelLocation) {
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
outPath="TMessagesProj/build/outputs/apk/full/release"
|
||||||
|
|
||||||
|
#./gradlew TMessagesProj:assembleFullRelease || exit 1
|
||||||
|
|
||||||
|
rm -f $outPath/*universal*
|
||||||
|
|
||||||
|
for apk in $outPath/*.apk; do
|
||||||
|
|
||||||
|
echo ">> Uploading $apk"
|
||||||
|
|
||||||
|
curl https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument \
|
||||||
|
-X POST \
|
||||||
|
-F chat_id="$TELEGRAM_CHANNEL" \
|
||||||
|
-F document="@$apk" \
|
||||||
|
--silent --show-error --fail > /dev/null &
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
trap 'kill $(jobs -p)' SIGINT
|
||||||
|
|
||||||
|
for job in `jobs -p`; do
|
||||||
|
wait $job
|
||||||
|
done
|
Loading…
Reference in New Issue