Fixing modal in the middle for big messages in landscape
This commit is contained in:
@@ -108,19 +108,18 @@ double _landScapeAlign(
|
|||||||
offset necessary for the position of reaction look the best way
|
offset necessary for the position of reaction look the best way
|
||||||
possible.
|
possible.
|
||||||
*/
|
*/
|
||||||
const constant = 3000;
|
|
||||||
if (isAttachment) {
|
if (isAttachment) {
|
||||||
result = 0;
|
result = 0;
|
||||||
} else if (user?.id == message.user?.id) {
|
} else if (user?.id == message.user?.id) {
|
||||||
if (divFactor >= 1.0) {
|
if (divFactor >= 1.3) {
|
||||||
result = 0;
|
result = 0;
|
||||||
} else {
|
} else {
|
||||||
// Small messages, it is simpler to align then.
|
// Small messages, it is simpler to align then.
|
||||||
result = 1 - divFactor * 0.6;
|
result = 1 - divFactor * 0.6;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (divFactor >= 1.0) {
|
if (divFactor >= 1.3) {
|
||||||
result = shiftFactor + maxWidth / constant;
|
result = 0;
|
||||||
} else {
|
} else {
|
||||||
result = -(1 - divFactor * 0.6);
|
result = -(1 - divFactor * 0.6);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user