2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 08:35:21 +00:00

Alpha 1.0.8: seek in voice messages (by waveform).

This commit is contained in:
John Preston
2017-02-11 01:37:37 +03:00
parent 296c800b39
commit e922e5be39
26 changed files with 347 additions and 125 deletions

View File

@@ -1076,12 +1076,11 @@ struct SongData : public DocumentAdditionalData {
typedef QVector<char> VoiceWaveform; // [0] == -1 -- counting, [0] == -2 -- could not count
struct VoiceData : public DocumentAdditionalData {
VoiceData() : duration(0), wavemax(0) {
}
~VoiceData();
int32 duration;
int duration = 0;
VoiceWaveform waveform;
char wavemax;
char wavemax = 0;
};
bool fileIsImage(const QString &name, const QString &mime);
@@ -1362,6 +1361,14 @@ protected:
void onClickImpl() const override;
};
class VoiceSeekClickHandler : public DocumentOpenClickHandler {
public:
using DocumentOpenClickHandler::DocumentOpenClickHandler;
protected:
void onClickImpl() const override {
}
};
class DocumentCancelClickHandler : public DocumentClickHandler {
public:
using DocumentClickHandler::DocumentClickHandler;