commit
a9bb384ddd
5 changed files with 47 additions and 185 deletions
209
.github/workflows/linux-kotato.yml
vendored
209
.github/workflows/linux-kotato.yml
vendored
|
|
@ -47,7 +47,7 @@ on:
|
|||
jobs:
|
||||
|
||||
linux:
|
||||
name: Ubuntu 16.04
|
||||
name: Ubuntu 18.04
|
||||
if: >
|
||||
!(github.event_name == 'push'
|
||||
&& contains(github.event.head_commit.message, '[skip ci]'))
|
||||
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:xenial
|
||||
image: ubuntu:bionic
|
||||
options: --privileged --device /dev/fuse
|
||||
|
||||
strategy:
|
||||
|
|
@ -69,12 +69,10 @@ jobs:
|
|||
env:
|
||||
GIT: "https://github.com"
|
||||
QT: "5_15_2"
|
||||
OPENSSL_VER: "1_1_1"
|
||||
CMAKE_VER: "3.17.0"
|
||||
CMAKE_VER: "3.21.3"
|
||||
UPLOAD_ARTIFACT: "true"
|
||||
ONLY_CACHE: "false"
|
||||
MANUAL_CACHING: "1"
|
||||
DOC_PATH: "docs/building-cmake.md"
|
||||
AUTO_CACHING: "1"
|
||||
CXX: "g++ -static-libstdc++"
|
||||
|
||||
|
|
@ -101,22 +99,21 @@ jobs:
|
|||
apt-get install software-properties-common -y && \
|
||||
add-apt-repository ppa:git-core/ppa -y && \
|
||||
apt-get update && \
|
||||
apt-get install clang libglib2.0-dev libicu-dev liblzma-dev zlib1g-dev libudev-dev \
|
||||
git wget autoconf automake build-essential libtool pkg-config bison yasm \
|
||||
libasound2-dev libpulse-dev libdrm-dev libfuse2 libgtk-3-dev libgtk2.0-dev \
|
||||
libatspi2.0-dev libgl1-mesa-dev libegl1-mesa-dev libffi-dev libxcb1-dev \
|
||||
apt-get install clang libglibmm-2.4-dev libicu-dev libssl-dev liblzma-dev zlib1g-dev \
|
||||
git wget autoconf automake build-essential libtool pkg-config bison nasm yasm unzip \
|
||||
libasound2-dev libpulse-dev libfuse2 libgtk-3-dev libgtk2.0-dev libatspi2.0-dev \
|
||||
libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev \
|
||||
libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \
|
||||
libxcb-randr0-dev libxcb-record0-dev libxcb-render0-dev libxcb-render-util0-dev \
|
||||
libxcb-res0-dev libxcb-screensaver0-dev libxcb-shape0-dev libxcb-shm0-dev \
|
||||
libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev \
|
||||
libxcb-util0-dev libx11-xcb-dev libxext-dev libxfixes-dev libxv-dev libva-dev \
|
||||
libvdpau-dev libsigc++-2.0-dev libxml-parser-perl mm-common xutils-dev \
|
||||
unzip libwebkit2gtk-4.0-dev subversion -y --force-yes && \
|
||||
libxcb-util0-dev libx11-xcb-dev libxext-dev libxfixes-dev libxv-dev libwayland-dev \
|
||||
libva-dev libvdpau-dev xutils-dev meson ninja-build subversion -y --force-yes && \
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
|
||||
apt-get update && \
|
||||
apt-get install gcc-9 g++-9 -y && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 && \
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60 && \
|
||||
apt-get install gcc-10 g++-10 -y && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 && \
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 60 && \
|
||||
update-alternatives --config gcc && \
|
||||
add-apt-repository --remove ppa:ubuntu-toolchain-r/test -y
|
||||
|
||||
|
|
@ -166,55 +163,6 @@ jobs:
|
|||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
- name: OpenSSL cache.
|
||||
id: cache-openssl
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LibrariesPath }}/openssl-cache
|
||||
key: ${{ runner.OS }}-${{ env.OPENSSL_VER }}-${{ env.CACHE_KEY }}
|
||||
- name: OpenSSL build.
|
||||
if: steps.cache-openssl.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
opensslDir=openssl_${OPENSSL_VER}
|
||||
git clone -b OpenSSL_${OPENSSL_VER}-stable --depth=1 \
|
||||
$GIT/openssl/openssl $opensslDir
|
||||
cd $opensslDir
|
||||
./config --openssldir=/etc/ssl no-tests no-dso
|
||||
make -j$(nproc)
|
||||
make DESTDIR="$LibrariesPath/openssl-cache" install_sw
|
||||
cd ..
|
||||
rm -rf $opensslDir
|
||||
- name: OpenSSL install.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
cp -R openssl-cache/. /
|
||||
ldconfig
|
||||
|
||||
- name: Python 3.8 cache.
|
||||
id: cache-python
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LibrariesPath }}/python-cache
|
||||
key: ${{ runner.OS }}-python-${{ env.CACHE_KEY }}
|
||||
- name: Python 3.8 build.
|
||||
if: steps.cache-python.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v3.8.2 --depth=1 $GIT/python/cpython.git
|
||||
cd cpython
|
||||
./configure --enable-optimizations
|
||||
make -j$(nproc)
|
||||
make DESTDIR="$LibrariesPath/python-cache" install
|
||||
cd ..
|
||||
rm -rf cpython
|
||||
- name: Python 3.8 install.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
cp -R python-cache/. /
|
||||
|
||||
- name: CMake.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
|
@ -232,56 +180,26 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.80.0 --depth=1 $GIT/KDE/extra-cmake-modules.git
|
||||
git clone -b v5.88.0 --depth=1 $GIT/KDE/extra-cmake-modules.git
|
||||
cd extra-cmake-modules
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ..
|
||||
rm -rf extra-cmake-modules
|
||||
|
||||
- name: Meson.
|
||||
run: |
|
||||
python3 -m pip install meson==0.54.0
|
||||
meson --version
|
||||
|
||||
- name: Ninja.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
chmod +x ninja
|
||||
mv ninja /usr/local/bin
|
||||
|
||||
ninja --version
|
||||
|
||||
- name: NASM.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b nasm-2.14.02 --depth=1 https://repo.or.cz/nasm.git
|
||||
cd nasm
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j$(nproc)
|
||||
install nasm /usr/local/bin/nasm
|
||||
install ndisasm /usr/local/bin/ndisasm
|
||||
cd ..
|
||||
rm -rf nasm
|
||||
|
||||
- name: MozJPEG.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v4.0.1-rc2 --depth=1 $GIT/mozilla/mozjpeg.git
|
||||
git clone -b v4.0.3 --depth=1 $GIT/mozilla/mozjpeg.git
|
||||
cd mozjpeg
|
||||
cmake -B build . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DWITH_JPEG8=ON \
|
||||
-DPNG_SUPPORTED=OFF
|
||||
cmake --build build -j$(nproc)
|
||||
cmake --build build --parallel
|
||||
cmake --install build
|
||||
cd ..
|
||||
rm -rf mozjpeg
|
||||
|
|
@ -333,8 +251,6 @@ jobs:
|
|||
--disable-protocols \
|
||||
--disable-devices \
|
||||
--disable-filters \
|
||||
--disable-alsa \
|
||||
--disable-iconv \
|
||||
--enable-shared \
|
||||
--enable-libopus \
|
||||
--enable-vaapi \
|
||||
|
|
@ -369,7 +285,7 @@ jobs:
|
|||
-DALSOFT_UTILS=OFF \
|
||||
-DALSOFT_CONFIG=OFF
|
||||
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
ldconfig
|
||||
|
||||
|
|
@ -380,7 +296,7 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b 1.20 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
git clone -b 1.23 --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
cd wayland-protocols
|
||||
./autogen.sh
|
||||
make -j$(nproc)
|
||||
|
|
@ -392,65 +308,14 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v1.1.1 --depth=1 $GIT/KDE/plasma-wayland-protocols.git
|
||||
git clone -b v1.4.0 --depth=1 $GIT/KDE/plasma-wayland-protocols.git
|
||||
cd plasma-wayland-protocols
|
||||
cmake -B build . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j$(nproc)
|
||||
cmake --build build --parallel
|
||||
cmake --install build
|
||||
cd ..
|
||||
rm -rf plasma-wayland-protocols
|
||||
|
||||
- name: Libwayland.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b 1.18.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland
|
||||
cd wayland
|
||||
./autogen.sh \
|
||||
--disable-documentation \
|
||||
--disable-dtd-validation
|
||||
make -j$(nproc)
|
||||
make install
|
||||
ldconfig
|
||||
cd ..
|
||||
rm -rf wayland
|
||||
|
||||
- name: Libxkbcommon.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b xkbcommon-1.0.3 --depth=1 $GIT/xkbcommon/libxkbcommon.git
|
||||
cd libxkbcommon
|
||||
meson build \
|
||||
--libdir=/usr/local/lib \
|
||||
-Denable-docs=false \
|
||||
-Denable-wayland=false \
|
||||
-Denable-xkbregistry=false \
|
||||
-Dxkb-config-root=/usr/share/X11/xkb \
|
||||
-Dxkb-config-extra-path=/etc/xkb \
|
||||
-Dx-locale-root=/usr/share/X11/locale
|
||||
meson compile -C build -j$(nproc)
|
||||
meson install -C build
|
||||
ldconfig
|
||||
cd ..
|
||||
rm -rf libxkbcommon
|
||||
|
||||
- name: Glibmm.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b 2.40.0 --depth=1 $GIT/GNOME/glibmm.git
|
||||
cd glibmm
|
||||
git apply ../patches/glibmm.patch
|
||||
export ACLOCAL_PATH="/usr/local/share/aclocal"
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
CXXFLAGS="-g -O2 -std=c++14" ./configure --enable-maintainer-mode --disable-documentation
|
||||
make -j$(nproc)
|
||||
make install
|
||||
ldconfig
|
||||
cd ..
|
||||
rm -rf glibmm
|
||||
|
||||
- name: Qt 5.15.2 cache.
|
||||
id: cache-qt
|
||||
uses: actions/cache@v2
|
||||
|
|
@ -465,7 +330,6 @@ jobs:
|
|||
git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
|
||||
cd qt_${QT}
|
||||
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qttools,qtx11extras
|
||||
git submodule update qtbase qtwayland qtimageformats qtsvg qttools qtx11extras
|
||||
cd qtbase
|
||||
find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
||||
cd ../qtwayland
|
||||
|
|
@ -483,7 +347,6 @@ jobs:
|
|||
-no-feature-xcb-sm \
|
||||
-no-feature-wayland-server \
|
||||
-openssl-linked \
|
||||
OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto" \
|
||||
QMAKE_CXX="$CXX" \
|
||||
QMAKE_LINK="$CXX" \
|
||||
-nomake examples \
|
||||
|
|
@ -516,13 +379,13 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.80.0 --depth=1 $GIT/KDE/kwayland.git
|
||||
git clone -b v5.88.0 --depth=1 $GIT/KDE/kwayland.git
|
||||
cd kwayland
|
||||
cmake . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DKDE_INSTALL_LIBDIR=lib
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
ldconfig
|
||||
cd ..
|
||||
|
|
@ -532,13 +395,13 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b v5.80.0 --depth=1 $GIT/KDE/kwindowsystem.git
|
||||
git clone -b v5.88.0 --depth=1 $GIT/KDE/kwindowsystem.git
|
||||
cd kwindowsystem
|
||||
cmake . \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DKDE_INSTALL_LIBDIR=lib
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
ldconfig
|
||||
cd ..
|
||||
|
|
@ -548,10 +411,10 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.2 qt5ct
|
||||
svn checkout https://svn.code.sf.net/p/qt5ct/code/tags/qt5ct-1.5 qt5ct
|
||||
cd qt5ct
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ..
|
||||
rm -rf qt5ct
|
||||
|
|
@ -560,10 +423,10 @@ jobs:
|
|||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone -b V0.15.3 --depth=1 $GIT/tsujan/Kvantum.git
|
||||
git clone -b V0.20.2 --depth=1 $GIT/tsujan/Kvantum.git
|
||||
cd Kvantum/Kvantum
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ../..
|
||||
rm -rf Kvantum
|
||||
|
|
@ -583,17 +446,17 @@ jobs:
|
|||
cd tg_owt
|
||||
git init
|
||||
git remote add origin $GIT/desktop-app/tg_owt.git
|
||||
git fetch --depth=1 origin 91d836dc84a16584c6ac52b36c04c0de504d9c34
|
||||
git fetch --depth=1 origin b02478677baac6d563589f216800ff9cea0fd65c
|
||||
git reset --hard FETCH_HEAD
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
cd src/third_party/pipewire
|
||||
meson build
|
||||
meson build -Dspa-plugins=disabled
|
||||
cd ../../..
|
||||
|
||||
cmake -B build . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DTG_OWT_DLOPEN_PIPEWIRE=ON
|
||||
cmake --build build -j$(nproc)
|
||||
cmake --build build --parallel
|
||||
|
||||
- name: Kotatogram Desktop build.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
|
|
@ -605,9 +468,6 @@ jobs:
|
|||
DEFINE=""
|
||||
if [ -n "${{ matrix.defines }}" ]; then
|
||||
DEFINE="-D ${{ matrix.defines }}=ON"
|
||||
if [ "${{ matrix.defines }}" = "DESKTOP_APP_DISABLE_DBUS_INTEGRATION" ]; then
|
||||
DEFINE="$DEFINE -D DESKTOP_APP_DISABLE_WEBKITGTK=ON"
|
||||
fi
|
||||
echo Define from matrix: $DEFINE
|
||||
echo "ARTIFACT_NAME=Kotatogram_${{ matrix.defines }}" >> $GITHUB_ENV
|
||||
else
|
||||
|
|
@ -615,14 +475,15 @@ jobs:
|
|||
fi
|
||||
|
||||
./configure.sh \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_C_FLAGS="-Werror" \
|
||||
-DCMAKE_CXX_FLAGS="-Werror" \
|
||||
-DTDESKTOP_API_TEST=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||
-DDESKTOP_APP_QT6=OFF \
|
||||
$DEFINE
|
||||
|
||||
cd ../out/Release
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --build ../out --config Debug --parallel
|
||||
DESTDIR=../../AppDir cmake --install .
|
||||
|
||||
- name: AppImage build.
|
||||
|
|
|
|||
11
.github/workflows/mac-kotato.yml
vendored
11
.github/workflows/mac-kotato.yml
vendored
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
|
||||
- name: First set up.
|
||||
run: |
|
||||
brew install autoconf automake cmake meson openal-soft openssl opus nasm ninja pkg-config python qt@5 yasm xz
|
||||
brew install autoconf automake cmake meson openal-soft openssl opus nasm ninja pkg-config python qt yasm xz
|
||||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||||
|
||||
xcodebuild -version > CACHE_KEY.txt
|
||||
|
|
@ -92,7 +92,7 @@ jobs:
|
|||
fi
|
||||
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
|
||||
|
||||
echo /usr/local/opt/qt@5/bin >> $GITHUB_PATH
|
||||
echo /usr/local/opt/qt/bin >> $GITHUB_PATH
|
||||
|
||||
mkdir -p Libraries/macos
|
||||
cd Libraries/macos
|
||||
|
|
@ -137,7 +137,6 @@ jobs:
|
|||
--disable-protocols \
|
||||
--disable-devices \
|
||||
--disable-filters \
|
||||
--disable-iconv \
|
||||
--enable-audiotoolbox \
|
||||
--enable-videotoolbox \
|
||||
--enable-libopus \
|
||||
|
|
@ -176,7 +175,7 @@ jobs:
|
|||
-DTG_OWT_BUILD_AUDIO_BACKENDS=OFF \
|
||||
-DTG_OWT_PACKAGED_BUILD_FFMPEG_STATIC=ON
|
||||
|
||||
cmake --build build -j$(sysctl -n hw.logicalcpu)
|
||||
cmake --build build --parallel
|
||||
|
||||
- name: Kotatogram Desktop build.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
|
|
@ -197,12 +196,14 @@ jobs:
|
|||
cmake -Bbuild -GNinja . \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_FIND_FRAMEWORK=LAST \
|
||||
-DCMAKE_C_FLAGS="-Werror" \
|
||||
-DCMAKE_CXX_FLAGS="-Werror" \
|
||||
-DTDESKTOP_API_TEST=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC=ON \
|
||||
$DEFINE
|
||||
|
||||
cmake --build build -j$(sysctl -n hw.logicalcpu)
|
||||
cmake --build build --parallel
|
||||
|
||||
cd build
|
||||
macdeployqt Kotatogram.app
|
||||
|
|
|
|||
|
|
@ -1435,7 +1435,7 @@ PRIVATE
|
|||
G_LOG_DOMAIN="Kotatogram"
|
||||
)
|
||||
|
||||
if ("${CMAKE_GENERATOR}" STREQUAL "Xcode"
|
||||
if (APPLE
|
||||
OR "${CMAKE_GENERATOR}" STREQUAL "Ninja Multi-Config"
|
||||
OR NOT CMAKE_EXECUTABLE_SUFFIX STREQUAL ""
|
||||
OR NOT "${output_name}" STREQUAL "Kotatogram")
|
||||
|
|
|
|||
|
|
@ -3242,8 +3242,8 @@ void ApiWrap::forwardMessages(
|
|||
const auto newGroupId = item->groupId();
|
||||
if (item != draft.items.front() &&
|
||||
((draft.groupOptions == Data::GroupingOptions::GroupAsIs
|
||||
&& (forwardGroupId != newGroupId || forwardFrom != newFrom)
|
||||
|| draft.groupOptions == Data::GroupingOptions::Separate))) {
|
||||
&& (forwardGroupId != newGroupId || forwardFrom != newFrom))
|
||||
|| draft.groupOptions == Data::GroupingOptions::Separate)) {
|
||||
sendAccumulated();
|
||||
forwardFrom = newFrom;
|
||||
forwardGroupId = newGroupId;
|
||||
|
|
|
|||
|
|
@ -218,20 +218,20 @@ LocalFolder ChatFilter::toLocal(int cloudOrder, FilterId replaceId) const {
|
|||
auto always = _always;
|
||||
auto pinned = std::vector<uint64>();
|
||||
pinned.reserve(_pinned.size());
|
||||
for (const auto history : _pinned) {
|
||||
for (const auto &history : _pinned) {
|
||||
const auto &peer = history->peer;
|
||||
pinned.push_back(peer->id.value);
|
||||
always.remove(history);
|
||||
}
|
||||
auto include = std::vector<uint64>();
|
||||
include.reserve(always.size());
|
||||
for (const auto history : always) {
|
||||
for (const auto &history : always) {
|
||||
const auto &peer = history->peer;
|
||||
include.push_back(peer->id.value);
|
||||
}
|
||||
auto never = std::vector<uint64>();
|
||||
never.reserve(_never.size());
|
||||
for (const auto history : _never) {
|
||||
for (const auto &history : _never) {
|
||||
const auto &peer = history->peer;
|
||||
never.push_back(peer->id.value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue